lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 18 Mar 2010 19:16:37 +0100
From:	stephane eranian <eranian@...glemail.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Stephane Eranian <eranian@...gle.com>,
	linux-kernel@...r.kernel.org, peterz@...radead.org,
	paulus@...ba.org, davem@...emloft.net, fweisbec@...il.com,
	robert.richter@....com, perfmon2-devel@...ts.sf.net
Subject: Re: [PATCH] perf: fix stat attach bogus counts

On Thu, Mar 18, 2010 at 6:36 PM, Ingo Molnar <mingo@...e.hu> wrote:
>
> * Stephane Eranian <eranian@...gle.com> wrote:
>
>>       When perf stat -p pid is used, the events must be enabled
>>       immediately as there is no exec and thus no enable_on_exec.
>>
>>       Signed-off-by: Stephane Eranian <eranian@...gle.com>
>>
>> --
>>  builtin-stat.c |    6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
>> index 95db31c..3a91fad 100644
>> --- a/tools/perf/builtin-stat.c
>> +++ b/tools/perf/builtin-stat.c
>> @@ -159,8 +159,10 @@ static void create_perf_stat_counter(int counter, int pid)
>>               }
>>       } else {
>>               attr->inherit        = inherit;
>> -             attr->disabled       = 1;
>> -             attr->enable_on_exec = 1;
>> +             if (target_pid == -1) {
>> +                     attr->disabled       = 1;
>> +                     attr->enable_on_exec = 1;
>> +             }
>
> Mind checking latest -tip, which has these commits:
>
> d6d901c: perf events: Change perf parameter --pid to process-wide collection instead of thread-wid
> 46be604: perf record: Enable counters only when kernel is execing subcommand
> 6be2850: perf stat: Enable counters when collecting process-wide or system-wide data
>
> as they fix/improve various --pid related behavioral aspects of perf. Does it
> work fine for you now?
>
They indeed included the same fix.
So that's fine now.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists