lkml.org 
[lkml]   [2011]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Add inverted call graph report support to perf tool
    On Mon, Mar 07, 2011 at 09:43:27PM +0800, Sam Liao wrote:
    > +
    > + /* reverse call chain data */
    > + if (reverse_call && symbol_conf.use_callchain && sample->callchain) {

    You probably want to check for nr > 1 here, as in:

    /* reverse call chain data */
    - if (reverse_call && symbol_conf.use_callchain && sample->callchain) {
    + if (reverse_call && symbol_conf.use_callchain && sample->callchain
    + && (sample->callchain->nr > 1)) {
    struct ip_callchain *chain;
    int i, j;
    u64 tmp_ip;

    Otherwise, if you get a callchain with ->nr == 0, the loop with (nr - 2) will
    go on for a long time.

    -Arun


    \
     
     \ /
      Last update: 2011-03-17 18:55    [W:0.033 / U:0.872 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site