lkml.org 
[lkml]   [2012]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] Fix number of events displayed in header
On 3/20/12 1:42 PM, Arnaldo Carvalho de Melo wrote:
> Em Tue, Mar 20, 2012 at 02:23:16PM -0500, Ashay Rane escreveu:
>> From: Ashay Rane<ashay.rane@tacc.utexas.edu>
>
> Too short a changeset comment, please elaborate.
>
> The change at least would have to be changed from
>
> "Events: %llu", total_period
>
> to
>
> "Total period: %llu", total_period
>
> To be consistent in what we call "Events", i.e. right now it is telling
> the number of PERF_RECORD_SAMPLE events, with your change it woul0d be
> showing the sum of the periods in all samples.

Does not seem appropriate to change from number of sample events to
period for all event types. This change assumes the event is cycles,
cpu-clock or task-clock.

David


>
> - Arnaldo
>
>> Signed-off-by: Ashay Rane<ashay.rane@tacc.utexas.edu>
>> ---
>> tools/perf/builtin-report.c | 6 ++----
>> 1 files changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
>> index 25d34d4..58a20cf 100644
>> --- a/tools/perf/builtin-report.c
>> +++ b/tools/perf/builtin-report.c
>> @@ -202,11 +202,9 @@ static size_t hists__fprintf_nr_sample_events(struct hists *self,
>> const char *evname, FILE *fp)
>> {
>> size_t ret;
>> - char unit;
>> - unsigned long nr_events = self->stats.nr_events[PERF_RECORD_SAMPLE];
>> + u64 total_period = self->stats.total_period;
>>
>> - nr_events = convert_unit(nr_events,&unit);
>> - ret = fprintf(fp, "# Events: %lu%c", nr_events, unit);
>> + ret = fprintf(fp, "# Events: %llu", total_period);
>> if (evname != NULL)
>> ret += fprintf(fp, " %s", evname);
>> return ret + fprintf(fp, "\n#\n");
>> --
>> 1.7.4.1
> --
> To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html



\
 
 \ /
  Last update: 2012-03-20 20:49    [W:0.272 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site