lkml.org 
[lkml]   [2013]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4 2/2] perf stat: add interval printing
From
On Tue, Jan 22, 2013 at 6:03 AM, Namhyung Kim <namhyung@kernel.org> wrote:
> Hi Stephane,
>
> On Mon, 21 Jan 2013 13:38:29 +0100, Stephane Eranian wrote:
>> On Mon, Jan 21, 2013 at 3:53 AM, Namhyung Kim <namhyung@kernel.org> wrote:
>>> AFAICS the only caller of print_stat() is cmd_stat() and it'll call this
>>> only if interval is 0. So why not just setting prefix to NULL then?
>>>
>> I don't understand your point here. Prefix is set ONLY when interval
>> is non zero. Prefix is setup before print_counter() so that each counter
>> for each interval is timestamped with the same value.
>
> Please see below.
>
>
>>>> - if (status != -1)
>>>> + if (status != -1 && !interval)
>>>> print_stat(argc, argv);
>
> Here, print_stat() is called only if interval is 0. So no need to check
> the interval inside the print_stat(), right?
>
Ok, got it. Due to some leftover code. Will fix in V6.
Thanks.


\
 
 \ /
  Last update: 2013-01-22 14:21    [W:0.045 / U:2.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site