From: Anton Blanchard <anton@samba.org>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: mingo@elte.hu, paulus@samba.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf_counter: Always return the parent counter id to userspace
Date: Mon, 20 Jul 2009 21:47:20 +1000 [thread overview]
Message-ID: <20090720114720.GB9029@kryten> (raw)
In-Reply-To: <1248087346.15751.8437.camel@twins>
Hi Peter,
> Please add -p to your diff args, or use
> QUILT_DIFF_OPTS="--show-c-function".
Sorry about that, I lost my .quiltrc somewhere along the line.
> > @@ -2704,8 +2718,10 @@
> > if (sample_type & PERF_SAMPLE_ADDR)
> > perf_output_put(&handle, data->addr);
> >
> > - if (sample_type & PERF_SAMPLE_ID)
> > - perf_output_put(&handle, counter->id);
> > + if (sample_type & PERF_SAMPLE_ID) {
> > + u64 id = primary_counter_id(counter);
> > + perf_output_put(&handle, id);
> > + }
> >
> > if (sample_type & PERF_SAMPLE_CPU)
> > perf_output_put(&handle, cpu_entry);
>
> This will actually wreck things.
>
> It would be impossible to relate PERF_EVENT_PERIOD/THROTTLE (and maybe
> others) to their respective counters.
>
> If you have inherited counters and each task will have separate ones,
> you need separate IDs in their sample stream to be able to related
> PERIOD and THROTTLE events.
I think I'm missing something. I'm logging two events at once with perf record
(-e page-faults -e dTLB-load-misses) and I added PERF_SAMPLE_ID to be able to
identify each event in the output file.
I'm not seeing a way to inherit and share counters (so we always get a
consistent id which matches the perf.data header), or a way for the new
counters to be written out to the log as they are created (so I can work
back to the original id).
Anton
next prev parent reply other threads:[~2009-07-20 11:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-20 10:38 [PATCH] perf_counter: Always return the parent counter id to userspace Anton Blanchard
2009-07-20 10:55 ` Peter Zijlstra
2009-07-20 11:47 ` Anton Blanchard [this message]
2009-07-20 13:17 ` Peter Zijlstra
2009-07-22 5:10 ` Anton Blanchard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090720114720.GB9029@kryten \
--to=anton@samba.org \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox