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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <570F5DDA.5010808@huawei.com>
Date:	Thu, 14 Apr 2016 17:07:38 +0800
From:	"Wangnan (F)" <wangnan0@...wei.com>
To:	Adrian Hunter <adrian.hunter@...el.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>
CC:	<linux-kernel@...r.kernel.org>, <pi3orama@....com>,
	He Kuang <hekuang@...wei.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	"Masami Hiramatsu" <masami.hiramatsu.pt@...achi.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Zefan Li <lizefan@...wei.com>
Subject: Re: [PATCH 03/10] perf record: Turns auxtrace_snapshot_enable into 3
 states



On 2016/4/14 16:30, Adrian Hunter wrote:
> On 14/04/16 10:50, Wangnan (F) wrote:
>>
>> On 2016/4/14 15:15, Adrian Hunter wrote:
>>> On 13/04/16 18:55, Arnaldo Carvalho de Melo wrote:
>>>> Em Wed, Apr 13, 2016 at 08:21:06AM +0000, Wang Nan escreveu:
>>>>> auxtrace_snapshot_enable has only two states (0/1). Turns it into a
>>>>> triple states enum so SIGUSR2 handler can safely do other works without
>>>>> triggering auxtrace snapshot.
>>>> Adrian, can you take a look at this? Is it ok with you?
>>> Please forgive me if these are stupid questions:
>>>
>>> First I am wondering why we wouldn't want to snapshot auxtrace data at the
>>> same time as the perf buffer?
>> This patch doesn't prevent taking snapshot when receiving SIGUSR2.
> So it was a stupid question ;-)

Still thank you for pointing this. I suddenly realized the 
'switch_output_started'
in patch 5/10 is also need to be turned to a 3 state enum. If not, a 
SIGUSR2 incorrectly
triggers output switching even '--switch-output' is not provided when 
'--snapshot' exist.

>
>> If both --snapshot and --switch-outupt is provided, when SIGUSR2 received,
>> perf takes auxtrace snapshot and other perf buffer together.
> How do you keep from losing tracking information like MMAP events?  Are they
> is a different buffer?

Please see patch 8/10 and 9/10. MMAP events are resynthesized each time
when output file switched, so at the *head* of each 'perf.data' you can find
many MMAP/COMM/FORK... events.

After overwritable ring buffer is supported, there is a more aggresive
patch [1] resynthesize tracking events and put them at the *end* of
perf.data.

[1] 
https://git.kernel.org/cgit/linux/kernel/git/pi3orama/linux.git/commit/?h=perf/overwrite&id=747e10300397b9c28b01bca5bfad943c8cf2dcce


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ