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] [thread-next>] [day] [month] [year] [list]
Message-ID: <f8d0accb-b569-3fcd-ffe5-99e2fab4c8b7@linux.intel.com>
Date:   Mon, 11 Oct 2021 12:53:30 +0300
From:   "Bayduraev, Alexey V" <alexey.v.bayduraev@...ux.intel.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Andi Kleen <ak@...ux.intel.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Alexander Antonov <alexander.antonov@...ux.intel.com>,
        Alexei Budankov <abudankov@...wei.com>,
        Riccardo Mancini <rickyman7@...il.com>
Subject: Re: [PATCH v3 6/8] perf session: Move event read code to separate
 function



On 11.10.2021 12:08, Bayduraev, Alexey V wrote:
> 
> On 08.10.2021 17:38, Jiri Olsa wrote:
>> On Fri, Oct 08, 2021 at 11:42:18AM +0300, Bayduraev, Alexey V wrote:
>>>
>>>
>>> On 08.10.2021 10:33, Jiri Olsa wrote:
>>>> On Thu, Oct 07, 2021 at 01:25:41PM +0300, Alexey Bayduraev wrote:
>>>>
>>>> SNIP
>>>>
>>>>>  static int
>>>>> -reader__process_events(struct reader *rd, struct perf_session *session,
>>>>> -		       struct ui_progress *prog)
>>>>> +reader__read_event(struct reader *rd, struct perf_session *session,
>>>>> +		   struct ui_progress *prog)
> 
> SNIP
> 
>>>>
>>>> active_decomp should be set/unset within reader__process_events,
>>>> not just for single event read, right?
>>>
>>> No, it should be set before perf_session__process_event/process_decomp_events
>>> and unset after these calls. So active_decomp setting/unsetting is moved in
>>> this patch to the reader__read_event function. This is necessary for multiple
>>> trace reader because it could call reader__read_event in round-robin manner.
>>
>> hum, is that code already in? I can't see this happening in current code
> 
> Probably I don't understand the question. In [PATCH v3 2/8] I introduced 
> active_decomp pointer in perf_session. It is initialized by a pointer to the 
> decompressor object in perf_session. In reader__process_events it is set to 
> the reader decompressor object. And it is reset to the session decompressor 
> object at exit. In this case we do not need to reset it after each 
> perf_session__process_event because this code reads events in loop with 
> constant reader object. Maybe setting of active_decomp should be at the 
> entrance to the reader__process_events, not before reader__process_events, 
> in [PATCH v3 2/8]. All this code is new.

We set active_decomp for perf_session__process_event (rd->process() in our
case) and for __perf_session__process_decomp_events, active_decomp is not 
necessary for other parts of reader__process_events.

Regards,
Alexey

> 
> In this patch I separates single event reading and moves setting/resetting
> of active_decomp before/after perf_session__process_event because this is 
> necessary for multiple trace reader. 
> 
> Regards,
> Alexey
> 
>>
>> jirka
>>
>>>
>>> Regards,
>>> Alexey
>>>
>>>>
>>>> jirka
>>>>
>>>>>  	return err;
>>>>>  }
>>>>>  
>>>>> -- 
>>>>> 2.19.0
>>>>>
>>>>
>>>
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ