All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Stephane Eranian <eranian@google.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	"mingo@elte.hu" <mingo@elte.hu>,
	"ak@linux.intel.com" <ak@linux.intel.com>,
	Vince Weaver <vincent.weaver@maine.edu>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: [BUG] perf report --pid not reporting correctly
Date: Fri, 23 Sep 2016 12:31:33 +0900	[thread overview]
Message-ID: <CAM9d7ciFGidiTmM_S2k6q8jFB3DNHb=cfQWpbNLDn6pmGZT6Tw@mail.gmail.com> (raw)
In-Reply-To: <20160922133617.GA4903@krava>

Hi Jiri,

On Thu, Sep 22, 2016 at 10:36 PM, Jiri Olsa <jolsa@redhat.com> wrote:
> On Thu, Sep 22, 2016 at 10:34:57AM +0900, Namhyung Kim wrote:
>
> SNIP
>
>>   $ perf report -s pid,cpu --stdio --hierarchy
>>   #
>>   #    Overhead  Pid:Command / CPU
>>   # ...........  .......................
>>   #
>>       31.21%     0:swapper
>>          12.16%     000
>>           3.09%     001
>>           2.76%     002
>>           2.23%     003
>>           1.65%     007
>>           1.65%     008
>>           1.52%     009
>>           1.51%     006
>>           1.46%     004
>>           1.34%     005
>>           0.94%     010
>>           0.90%     011
>>       19.15%     8618:getmail
>>          ...
>>
>>
>>
>>
>>
>> -----------------------8<-------------------------------
>> diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
>> index 8d363d5e65a2..42b1bfd29ef8 100644
>> --- a/tools/perf/util/event.h
>> +++ b/tools/perf/util/event.h
>> @@ -262,6 +262,7 @@ enum auxtrace_error_type {
>>   */
>>  struct events_stats {
>>       u64 total_period;
>> +     u64 total_early_filtered_period;
>
> looks good, but why the word early? wouldn't total_filtered_period be just fine?

I worried about it'd be confused to (wrongly) match to
"total_non_filtered_period".  One might think that the sum of filtered
+ non_filtered period should be the total period, but it's not.

I named it 'early' since it's filtered at sample level before creating
hist entry.  Later we can also filter on hist entries
(hists__filter_by_XXX) but it cannot affect the ones filtered earlier.

Thanks,
Namhyung


>
> thanks,
> jirka
>
>>       u64 total_non_filtered_period;
>>       u64 total_lost;
>>       u64 total_lost_samples;
>> diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
>> index 37a08f20730a..c7045411cce2 100644
>> --- a/tools/perf/util/hist.c
>> +++ b/tools/perf/util/hist.c
>> @@ -1017,12 +1017,21 @@ int hist_entry_iter__add(struct hist_entry_iter *iter, struct addr_location *al,
>>                        int max_stack_depth, void *arg)
>>  {
>>       int err, err2;
>> +     struct hists *hists = evsel__hists(iter->evsel);
>>
>>       err = sample__resolve_callchain(iter->sample, &callchain_cursor, &iter->parent,
>>                                       iter->evsel, al, max_stack_depth);
>>       if (err)
>>               return err;
>>
>> +     if (symbol__parent_filter(iter->parent))
>> +             al->filtered |= symbol__parent_filter(iter->parent);
>> +
>> +     if (al->filtered) {
>> +             hists->stats.total_early_filtered_period += iter->sample->period;
>
> SNIP
>



-- 
Thanks,
Namhyung

  reply	other threads:[~2016-09-23  3:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21  1:29 [BUG] perf report --pid not reporting correctly Stephane Eranian
2016-09-21 15:37 ` Arnaldo Carvalho de Melo
2016-09-21 16:34   ` Jiri Olsa
2016-09-21 20:18     ` Stephane Eranian
2016-09-22  1:34       ` Namhyung Kim
2016-09-22  2:22         ` Stephane Eranian
2016-09-22  3:20           ` Namhyung Kim
2016-09-22 13:36         ` Jiri Olsa
2016-09-23  3:31           ` Namhyung Kim [this message]
2016-09-22  0:14   ` Namhyung Kim
2016-09-22 14:57     ` Andi Kleen

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='CAM9d7ciFGidiTmM_S2k6q8jFB3DNHb=cfQWpbNLDn6pmGZT6Tw@mail.gmail.com' \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=vincent.weaver@maine.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.