[lkml]   [2009]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 5/6] perf_counter: add more context information

    * Peter Zijlstra <> wrote:

    > On Thu, 2009-04-02 at 20:18 +0200, Ingo Molnar wrote:
    > > * Peter Zijlstra <> wrote:
    > >
    > > > On Thu, 2009-04-02 at 13:36 +0200, Ingo Molnar wrote:
    > > >
    > > > > > -#define MAX_STACK_DEPTH 255
    > > > > > +#define MAX_STACK_DEPTH 254
    > > > > >
    > > > > > struct perf_callchain_entry {
    > > > > > - u64 nr;
    > > > > > + u32 nr, hv, kernel, user;
    > > > > > u64 ip[MAX_STACK_DEPTH];
    > > > > > };
    > > >
    > > > Oh, and Paul suggested using u16s right after I send it out. So
    > > > I'll either send an update or send a incremental in case you
    > > > already applied it.
    > >
    > > yes, that's probably a good idea. Although u8 might be even better -
    > > do we ever want to do more than 256 deep stack vectors? Even those
    > > would take quite some time to construct and pass down.
    > We'd have to pad it with 4 more bytes to remain u64 aligned,

    ok, indeed.

    > [...] also, why restrict ourselves. That MAX_STACK_DEPTH limit is
    > trivially fixable if indeed someone finds its insufficient.

    well .. think about it: walking more than 256 stack frames for every
    IRQ event? Getting backtraces like:


    does that make much sense _per event_? How do you visualize it?

    But yeah ... i could imagine some user-space craziness and since we
    want to align to u64 i guess that pretty much settles it to u16.


     \ /
      Last update: 2009-04-02 20:37    [W:0.035 / U:7.608 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site