mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jin, Yao" <yao.jin@linux.intel.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org,
	mingo@redhat.com, alexander.shishkin@linux.intel.com,
	Linux-kernel@vger.kernel.org, ak@linux.intel.com,
	kan.liang@intel.com, yao.jin@intel.com
Subject: Re: [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio
Date: Tue, 22 Oct 2019 09:04:38 +0800	[thread overview]
Message-ID: <bcc3035b-b50c-231f-23b3-b3f03b2b46a7@linux.intel.com> (raw)
In-Reply-To: <20191021160803.GH32718@krava>



On 10/22/2019 12:08 AM, Jiri Olsa wrote:
> On Tue, Oct 15, 2019 at 01:33:48PM +0800, Jin Yao wrote:
> 
> SNIP
> 
>> +			cycles += bi->cycles_aggr / bi->num_aggr;
>> +
>> +			he_block = hists__add_entry_block(&bh->block_hists,
>> +							  &al, bi);
>> +			if (!he_block) {
>> +				block_info__put(bi);
>> +				return -1;
>> +			}
>> +		}
>> +	}
>> +
>> +	if (block_cycles)
>> +		*block_cycles += cycles;
>> +
>> +	return 0;
>> +}
>> +
>> +static int resort_cb(struct hist_entry *he, void *arg __maybe_unused)
>> +{
>> +	/* Skip the calculation of column length in output_resort */
>> +	he->filtered = true;
> 
> that's a nasty hack ;-) together with setting it back to false just below
> 
> why do you want to skip the columns calculation? we could add those columns
> to the output as well no?
> 
> jirka
> 

The columns calculation for this case causes the crash. The current 
columns calculation requires some information but we don't provide. So I 
just want to skip the columns calculation.

OK, I will check how to avoid this nasty hack.

Thanks
Jin Yao

>> +	return 0;
>> +}
>> +
>> +static void hists__clear_filtered(struct hists *hists)
>> +{
>> +	struct rb_node *next = rb_first_cached(&hists->entries);
>> +	struct hist_entry *he;
>> +
>> +	while (next) {
>> +		he = rb_entry(next, struct hist_entry, rb_node);
>> +		he->filtered = false;
>> +		next = rb_next(&he->rb_node);
>> +	}
>> +}
> 
> SNIP
> 
> jirka
> 

  reply	other threads:[~2019-10-22  1:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15  5:33 [PATCH v2 0/5] perf report: Support sorting all blocks by cycles Jin Yao
2019-10-15  5:33 ` [PATCH v2 1/5] perf util: Create new block.h/block.c for block related functions Jin Yao
2019-10-21 16:08   ` Jiri Olsa
2019-10-15  5:33 ` [PATCH v2 2/5] perf util: Count the total cycles of all samples Jin Yao
2019-10-15  5:33 ` [PATCH v2 3/5] perf report: Sort by sampled cycles percent per block for stdio Jin Yao
2019-10-15  8:41   ` Jiri Olsa
2019-10-15 14:53     ` Jin, Yao
2019-10-16 10:15       ` Jiri Olsa
2019-10-16 10:51         ` Jin, Yao
2019-10-16 12:53           ` Jiri Olsa
2019-10-16 13:09             ` Jin, Yao
2019-10-21  6:56             ` Jin, Yao
2019-10-21 14:04               ` Jiri Olsa
2019-10-21 16:07                 ` Jiri Olsa
2019-10-21 16:07   ` Jiri Olsa
2019-10-22  0:57     ` Jin, Yao
2019-10-21 16:08   ` Jiri Olsa
2019-10-22  1:04     ` Jin, Yao [this message]
2019-10-15  5:33 ` [PATCH v2 4/5] perf report: Support --percent-limit for total_cycles Jin Yao
2019-10-15  5:33 ` [PATCH v2 5/5] perf report: Sort by sampled cycles percent per block for tui Jin Yao

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=bcc3035b-b50c-231f-23b3-b3f03b2b46a7@linux.intel.com \
    --to=yao.jin@linux.intel.com \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=kan.liang@intel.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=yao.jin@intel.com \
    /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

Powered by JetHome