Re: [PATCH v2 4/4] clock: add perf_clock posix clock

From: Paul Bolle
Date: Wed Feb 18 2015 - 14:00:46 EST


Whitespace trivialities follow.

On Wed, 2015-02-18 at 18:21 +0100, Stephane Eranian wrote:
> This patch is a re-packaging of David's Ahern
> posix perf clock available here:
>
> https://github.com/dsahern/linux/blob/perf-full-monty/README.ahern
>
> The patch itself is based on Pawel Moll's original post:
>
> https://lkml.org/lkml/2013/3/14/523
>
> The new clock is call PERF_CLOCK. To use it
>
> #include <time.h>
> #include <linux/time.h>
>
> struct timespec ts;
>
> clock_gettime(PERF_CLOCK, &ts);
>
> Signed-off-by: Stephane Eranian <eranian@xxxxxxxxxx>
> ---
> include/uapi/linux/time.h | 1 +
> kernel/time/Kconfig | 6 +++++
> kernel/time/Makefile | 1 +
> kernel/time/perf_posix_clock.c | 54 ++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 62 insertions(+)
> create mode 100644 kernel/time/perf_posix_clock.c
>
> diff --git a/include/uapi/linux/time.h b/include/uapi/linux/time.h
> index e75e1b6..9066bf0 100644
> --- a/include/uapi/linux/time.h
> +++ b/include/uapi/linux/time.h
> @@ -56,6 +56,7 @@ struct itimerval {
> #define CLOCK_BOOTTIME_ALARM 9
> #define CLOCK_SGI_CYCLE 10 /* Hardware specific */
> #define CLOCK_TAI 11
> +#define CLOCK_PERF 12
>
> #define MAX_CLOCKS 16
> #define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC)
> diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig
> index d626dc9..6e4b707 100644
> --- a/kernel/time/Kconfig
> +++ b/kernel/time/Kconfig
> @@ -201,5 +201,11 @@ config HIGH_RES_TIMERS
> hardware is not capable then this option only increases
> the size of the kernel image.
>
> +config PERF_CLOCK
> + tristate "Perf_events posix clock timer source"
> + help
> + This option adds a new posix clock timer source which uses the same time
> + source as the perf_events subsystem. It makes it possible to correlate
> + user level samples with perf_events samples.

Tab and two spaces followed by an empty line here, please.

> endmenu
> endif

Thanks,


Paul Bolle

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/