[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190815132236.GH30356@krava>
Date: Thu, 15 Aug 2019 15:22:36 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Jin Yao <yao.jin@...ux.intel.com>
Cc: acme@...nel.org, jolsa@...nel.org, peterz@...radead.org,
mingo@...hat.com, alexander.shishkin@...ux.intel.com,
Linux-kernel@...r.kernel.org, ak@...ux.intel.com,
kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH v4] perf diff: Report noisy for cycles diff
On Tue, Aug 13, 2019 at 03:30:37PM +0800, Jin Yao wrote:
SNIP
> static void
> hpp__entry_unpair(struct hist_entry *he, int idx, char *buf, size_t size)
> {
> @@ -1662,6 +1794,10 @@ static void data__hpp_register(struct data__file *d, int idx)
> fmt->color = hpp__color_cycles;
> fmt->sort = hist_entry__cmp_nop;
> break;
> + case PERF_HPP_DIFF__CYCLES_HIST:
> + fmt->color = hpp__color_cycles_hist;
> + fmt->sort = hist_entry__cmp_nop;
> + break;
> default:
> fmt->sort = hist_entry__cmp_nop;
> break;
> @@ -1688,8 +1824,15 @@ static int ui_init(void)
> * PERF_HPP_DIFF__RATIO
> * PERF_HPP_DIFF__WEIGHTED_DIFF
> */
> - data__hpp_register(d, i ? compute_2_hpp[compute] :
> - PERF_HPP_DIFF__BASELINE);
> + if (cycles_hist && (compute == COMPUTE_CYCLES)) {
> + data__hpp_register(d, i ? PERF_HPP_DIFF__CYCLES :
> + PERF_HPP_DIFF__BASELINE);
> + data__hpp_register(d, i ? PERF_HPP_DIFF__CYCLES_HIST :
> + PERF_HPP_DIFF__BASELINE);
> + } else {
> + data__hpp_register(d, i ? compute_2_hpp[compute] :
> + PERF_HPP_DIFF__BASELINE);
> + }
I tink that something like this might be less confusing instead of above:
if (cycles_hist && i && (compute == COMPUTE_CYCLES))
data__hpp_register(d, PERF_HPP_DIFF__CYCLES);
other than that the patch looks ok to me
jirka
Powered by blists - more mailing lists