lkml.org 
[lkml]   [2009]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 13/15] perf_counter: provide generic callchain bits
From
Date
On Thu, 2009-04-02 at 08:43 +0200, Peter Zijlstra wrote:
> On Wed, 2009-04-01 at 16:25 -0700, Corey Ashford wrote:
>
> > > struct callchain_event {
> > > u64 nr
> > > u64 ips[nr]
> > > };
> >
> > Looking at the current version of perf_counter.h in the -tip tree, this
> > struct definition is not visible to userspace (it's in the #ifdef KERNEL
> > section).
>
> Correct. Its been on my todo list to write a meta-struct definition
> along with the perf_event_type enum that details the data layout of the
> various types, but not include any actual structure other than the
> header in the userspace bits.
>
> Also, related to a comment Paul made on callchain markers, I wanted to
> change it so that we have ip markers in the chain that separate the
> kernel and user bits.
>
> I was thinking of ending the kernel trace with -1ULL and ending the user
> chain with 0ULL. Presumably we need one more to end hypervisor chains in
> case anybody manages to generate those ;-).
>
> This chain however will not change the struct, it will merely add 2
> extra entries.

Hmm, another idea:

struct perf_callchain_entry {
__u32 total, hv, kernel, user;
__u64 ips[total];
};




\
 
 \ /
  Last update: 2009-04-02 09:43    [W:0.063 / U:1.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site