On Mon, Mar 30, 2015 at 01:41:12PM -0600, David Ahern wrote:
> On 3/30/15 1:33 PM, Peter Zijlstra wrote:
> >On Mon, Mar 30, 2015 at 11:24:12AM -0600, David Ahern wrote:
> >>This works but the result is not always intuitive as to why it failed.
> >>
> >>On a kernel that does not support the clock id
On 3/30/15 1:34 PM, Peter Zijlstra wrote:
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 1abf6919b8a2..27679ab38511 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -766,7 +766,8 @@ void perf_evsel__config(struct perf_evsel *evsel, struct
record_opts *op
On Mon, Mar 30, 2015 at 12:41 PM, David Ahern wrote:
> On 3/30/15 1:33 PM, Peter Zijlstra wrote:
>>
>> On Mon, Mar 30, 2015 at 11:24:12AM -0600, David Ahern wrote:
>>>
>>> This works but the result is not always intuitive as to why it failed.
>>>
>>> On a kernel that does not support the clock id
On 3/30/15 1:33 PM, Peter Zijlstra wrote:
On Mon, Mar 30, 2015 at 11:24:12AM -0600, David Ahern wrote:
This works but the result is not always intuitive as to why it failed.
On a kernel that does not support the clock id you get:
$ perf sched record -k mono -- sleep 1
Error:
cloc
On 3/30/15 1:32 PM, Peter Zijlstra wrote:
--- 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("mo
On Mon, Mar 30, 2015 at 11:33:42AM -0600, David Ahern wrote:
> On 3/28/15 1:55 AM, Peter Zijlstra wrote:
> >@@ -761,6 +762,11 @@ void perf_evsel__config(struct perf_evse
> > attr->disabled = 0;
> > attr->enable_on_exec = 0;
> > }
> >+
> >+if (opts->clockid >= 0) {
>
On Mon, Mar 30, 2015 at 11:17:22AM -0600, David Ahern wrote:
> On 3/30/15 3:17 AM, Peter Zijlstra wrote:
> >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 al
On Mon, Mar 30, 2015 at 11:24:12AM -0600, David Ahern wrote:
> This works but the result is not always intuitive as to why it failed.
>
> On a kernel that does not support the clock id you get:
> $ perf sched record -k mono -- sleep 1
> Error:
> clockid not supported.
>
> And on a ker
On 3/28/15 1:55 AM, Peter Zijlstra wrote:
@@ -761,6 +762,11 @@ void perf_evsel__config(struct perf_evse
attr->disabled = 0;
attr->enable_on_exec = 0;
}
+
+ if (opts->clockid >= 0) {
+ attr->use_clockid = 1;
+ attr->clockid
On 3/28/15 1:55 AM, Peter Zijlstra wrote:
@@ -1085,6 +1093,8 @@ static int __perf_evsel__open(struct per
}
fallback_missing_features:
+ if (perf_missing_features.clockid)
+ evsel->attr.use_clockid = 0;
if (perf_missing_features.cloexec)
flags
On 3/30/15 3:17 AM, Peter Zijlstra wrote:
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),
On 3/30/15 2:24 AM, Peter Zijlstra wrote:
I am clearly missing some kernel patch to try out this perf patch. I have
the 4 timekeeper ones; none of those modify perf_event code. What other
patches are needed? Was this one (or some variant) accepted:
https://lkml.org/lkml/2015/2/20/236
http
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",
On Sun, Mar 29, 2015 at 07:00:19PM -0600, David Ahern wrote:
> On 3/28/15 1:55 AM, Peter Zijlstra wrote:
> >Subject: perf, record: Add clockid parameter
> >From: Peter Zijlstra
> >Date: Fri, 27 Mar 2015 15:32:01 +0100
> >
> >Teach perf-record about the new perf_event_attr::{use_clockid, clockid}
>
On 3/28/15 1:55 AM, Peter Zijlstra wrote:
Subject: perf, record: Add clockid parameter
From: Peter Zijlstra
Date: Fri, 27 Mar 2015 15:32:01 +0100
Teach perf-record about the new perf_event_attr::{use_clockid, clockid}
fields. Add a simple parameter to set the clock (if any) to be used for
the e
On Fri, Mar 27, 2015 at 03:37:47PM -0700, Stephane Eranian wrote:
> > + OPT_INTEGER('k', "clockid", &record.opts.clockid,
> > + "clockid to use for events"),
>
> I think you'd want a symbolic name for the clock to make this easier
> on the user.
Sure, here goes.
--
Subjec
On Fri, Mar 27, 2015 at 1:15 PM, Arnaldo Carvalho de Melo
wrote:
> Em Fri, Mar 27, 2015 at 11:35:25AM -0600, David Ahern escreveu:
>> On 3/27/15 11:20 AM, Peter Zijlstra wrote:
>> >>This is a new feature which means use_clockid on older kernels will fail.
>> >>So
>> >>need to catch that and throw
Em Fri, Mar 27, 2015 at 11:35:25AM -0600, David Ahern escreveu:
> On 3/27/15 11:20 AM, Peter Zijlstra wrote:
> >>This is a new feature which means use_clockid on older kernels will fail. So
> >>need to catch that and throw an error -- perhaps yet another probe function.
> >How does that work? What
On Fri, Mar 27, 2015 at 2:59 PM, Peter Zijlstra wrote:
> On Fri, Mar 27, 2015 at 05:15:34PM -0300, Arnaldo Carvalho de Melo wrote:
>> I.e. we're back to the sys_perf_event_open() error reporting suckz rockz
>> thing, this time with PeterZ trying to find a way to avoid getting back
>> to that discu
On Fri, Mar 27, 2015 at 05:15:34PM -0300, Arnaldo Carvalho de Melo wrote:
> I.e. we're back to the sys_perf_event_open() error reporting suckz rockz
> thing, this time with PeterZ trying to find a way to avoid getting back
> to that discussion... /me runz... ;-P
:-)
Not entirely, its just that I'
On 3/27/15 11:20 AM, Peter Zijlstra wrote:
This is a new feature which means use_clockid on older kernels will fail. So
need to catch that and throw an error -- perhaps yet another probe function.
How does that work? What do I grep to find an example? I figured if the
kernel didn't support the
On Fri, Mar 27, 2015 at 11:11:01AM -0600, David Ahern wrote:
> > tools/perf/builtin-record.c | 3 +++
> > tools/perf/perf.h | 1 +
> > tools/perf/util/evsel.c | 5 +
> > 3 files changed, 9 insertions(+)
>
> missing Documentation/perf-record.txt update
--- a/tools/perf/Documenta
On 3/27/15 8:32 AM, Peter Zijlstra wrote:
On Fri, Mar 27, 2015 at 04:48:08AM -0700, tip-bot for Peter Zijlstra wrote:
perf: Add per event clockid support
And here the accompanying userspace; which I'd totally forgotten about.
XXX: do we want to store the clockid in the data file as well, such
On Fri, Mar 27, 2015 at 04:48:08AM -0700, tip-bot for Peter Zijlstra wrote:
> perf: Add per event clockid support
And here the accompanying userspace; which I'd totally forgotten about.
XXX: do we want to store the clockid in the data file as well, such that
we can verify at perf-inject time the
24 matches
Mail list logo