lkml.org 
[lkml]   [2015]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] perf, record: Add clockid parameter
On Sat, Mar 28, 2015 at 08:55:49AM +0100, Peter Zijlstra wrote:
> +static const struct clockid_map clockids[] = {
> + /* available for all events, NMI safe */
> + CLOCKID_MAP("monotonic", CLOCK_MONOTONIC),
> + CLOCKID_MAP("monotonic_raw", CLOCK_MONOTONIC_RAW),
> + CLOCKID_MAP("raw", CLOCK_MONOTONIC_RAW),
> +
> + /* available for some events */
> + CLOCKID_MAP("realtime", CLOCK_REALTIME),
> + CLOCKID_MAP("boottime", CLOCK_BOOTTIME),
> + CLOCKID_MAP("tai", CLOCK_TAI),
> +
> + CLOCKID_END,
> +};


I did this on top..

--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -732,13 +732,16 @@ static const struct clockid_map clockids
/* available for all events, NMI safe */
CLOCKID_MAP("monotonic", CLOCK_MONOTONIC),
CLOCKID_MAP("monotonic_raw", CLOCK_MONOTONIC_RAW),
- CLOCKID_MAP("raw", CLOCK_MONOTONIC_RAW),

/* available for some events */
CLOCKID_MAP("realtime", CLOCK_REALTIME),
CLOCKID_MAP("boottime", CLOCK_BOOTTIME),
CLOCKID_MAP("tai", CLOCK_TAI),

+ /* available for the lazy */
+ CLOCKID_MAP("mono", CLOCK_MONOTONIC),
+ CLOCKID_MAP("raw", CLOCK_MONOTONIC_RAW),
+
CLOCKID_END,
};


\
 
 \ /
  Last update: 2015-03-30 12:01    [W:0.156 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site