lkml.org 
[lkml]   [2014]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 13/37] perf tools: Use thread__comm_time() when adding hist entries
On Wed, Dec 24, 2014 at 04:15:09PM +0900, Namhyung Kim wrote:

SNIP

>
> he = __hists__add_entry(hists, &al, NULL,
> - NULL, NULL, 1, 1, 0, true);
> + NULL, NULL, 1, 1, 0, -1, true);
> if (he == NULL)
> goto out;
>
> diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
> index 9314286ed25c..d322264bac22 100644
> --- a/tools/perf/util/hist.c
> +++ b/tools/perf/util/hist.c
> @@ -451,11 +451,11 @@ struct hist_entry *__hists__add_entry(struct hists *hists,
> struct branch_info *bi,
> struct mem_info *mi,
> u64 period, u64 weight, u64 transaction,
> - bool sample_self)
> + u64 timestamp, bool sample_self)
> {
> struct hist_entry entry = {
> .thread = al->thread,
> - .comm = thread__comm(al->thread),
> + .comm = thread__comm_time(al->thread, timestamp),

with thread object having multiple comm entries, could this hurt
the single threaded performance?

The thread__comm_time function iterates comm_list each time,
maybe you could add some 'last_comm found check' logic in it?

jirka


\
 
 \ /
  Last update: 2014-12-26 00:01    [W:0.263 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site