Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1378678

Re: [PATCH 03/10] perf record: Turns auxtrace_snapshot_enable into 3 states

From Adrian Hunter <adrian.hunter@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 03/10] perf record: Turns auxtrace_snapshot_enable into 3 states
Date 2016-04-14 12:30 +0200
Message-ID <rnMH8-bU-9@gated-at.bofh.it> (permalink)
References (2 earlier) <rnvmW-3u7-37@gated-at.bofh.it> <rnJJg-6qK-11@gated-at.bofh.it> <rnKlY-6Jd-29@gated-at.bofh.it> <rnKYF-7jf-11@gated-at.bofh.it> <rnLrJ-7Nv-27@gated-at.bofh.it>
Organization Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki

Show all headers | View raw


On 14/04/16 12:07, Wangnan (F) wrote:
> 
> 
> 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.

OK, I see.

> 
> 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
> 

Thanks for the information.  Auxtrace really needs complete MMAP
information, so I would probably need to look at other options as well.

Anyway for this patch:

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 03/10] perf record: Turns auxtrace_snapshot_enable into 3 states Wang Nan <wangnan0@huawei.com> - 2016-04-13 10:30 +0200
  Re: [PATCH 03/10] perf record: Turns auxtrace_snapshot_enable into 3  states Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-04-13 18:00 +0200
    Re: [PATCH 03/10] perf record: Turns auxtrace_snapshot_enable into 3  states Adrian Hunter <adrian.hunter@intel.com> - 2016-04-14 09:20 +0200
      Re: [PATCH 03/10] perf record: Turns auxtrace_snapshot_enable into 3  states "Wangnan (F)" <wangnan0@huawei.com> - 2016-04-14 10:00 +0200
        Re: [PATCH 03/10] perf record: Turns auxtrace_snapshot_enable into 3  states Adrian Hunter <adrian.hunter@intel.com> - 2016-04-14 10:40 +0200
          Re: [PATCH 03/10] perf record: Turns auxtrace_snapshot_enable into 3  states "Wangnan (F)" <wangnan0@huawei.com> - 2016-04-14 11:10 +0200
            Re: [PATCH 03/10] perf record: Turns auxtrace_snapshot_enable into 3  states Adrian Hunter <adrian.hunter@intel.com> - 2016-04-14 12:30 +0200
  [tip:perf/core] perf record: Turns auxtrace_snapshot_enable into 3  states tip-bot for Wang Nan <tipbot@zytor.com> - 2016-04-14 15:40 +0200

csiph-web