All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: "Jin, Yao" <yao.jin@linux.intel.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: Mon, 21 Oct 2019 16:04:39 +0200	[thread overview]
Message-ID: <20191021140439.GE32718@krava> (raw)
In-Reply-To: <2a16a22e-5bdd-949b-480f-1c0956e13c14@linux.intel.com>

On Mon, Oct 21, 2019 at 02:56:57PM +0800, Jin, Yao wrote:

SNIP

> > > Does it seem like what the c2c does?
> > 
> > well c2c has its own data output with multiline column titles,
> > hence it has its own separate dimension stuff, but your code
> > output is within the standard perf report right? single column
> > output.. why couldn't you use just sort_entry ?
> > 
> > jirka
> > 
> 
> Hi Jiri,
> 
> I've being thinking how to use sort_entry but I have some troubles.
> 
> In v2, I used "struct perf_hpp_fmt" to pass extra argument. For example,
> 
> static int64_t block_cycles_cov_sort(struct perf_hpp_fmt *fmt,
> 				     struct hist_entry *left,
> 				     struct hist_entry *right)
> {
> 	struct block_fmt *block_fmt = container_of(fmt, ...);
> 	struct report *rep = block_fmt->rep;
> 	...
> }
> 
> But if I just use sort_entry, I can't pass extra argument (it's not a good
> idea to add more fields in struct hist_entry).
> 
> int64_t sort__xxx_sort(struct hist_entry *left,
> 		       struct hist_entry *right)
> 
> And for entry print it's similar, I can't pass extra argument in.
> 
> In v2,
> static int block_cycles_pct_entry(struct perf_hpp_fmt *fmt,
> 				  struct perf_hpp *hpp,
> 				  struct hist_entry *he)
> {
> 	struct block_fmt *block_fmt = container_of(fmt,...);
> 	struct report *rep = block_fmt->rep;
> 	...
> }
> 
> But for se_snprintf, I can't pass extra argument in.
> 
> hist_entry__xxx_snprintf(struct hist_entry *he, char *bf,
> 			 size_t size, unsigned int width)
> 
> That's why I feel headache for just using the sort_entry. :(

you might be right, I just want to omit another field output framework ;-) 
I'm checking on this and will let you know if I find some way

jirka


  reply	other threads:[~2019-10-21 14: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 [this message]
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
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=20191021140439.GE32718@krava \
    --to=jolsa@redhat.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=kan.liang@intel.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=yao.jin@intel.com \
    --cc=yao.jin@linux.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 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.