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: <65a7172d-7e19-faec-d7c6-5384fc9d5b20@linux.intel.com>
Date:   Sat, 6 Jan 2018 06:55:56 +0800
From:   "Jin, Yao" <yao.jin@...ux.intel.com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     jolsa@...nel.org, peterz@...radead.org, mingo@...hat.com,
        alexander.shishkin@...ux.intel.com, Linux-kernel@...r.kernel.org,
        ak@...ux.intel.com, kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH v7 2/6] perf record: Get the first sample time and last
 sample time



On 1/5/2018 8:53 PM, Arnaldo Carvalho de Melo wrote:
> Em Fri, Jan 05, 2018 at 09:15:03AM +0800, Jin, Yao escreveu:
>>
>>
>> On 1/5/2018 3:09 AM, Arnaldo Carvalho de Melo wrote:
>>> Em Fri, Dec 08, 2017 at 09:13:42PM +0800, Jin Yao escreveu:
>>>> In the default 'perf record' configuration, all samples are processed,
>>>> to create the HEADER_BUILD_ID table. So it's very easy to get the
>>>> first/last samples and save the time to perf file header via the
>>>> function write_sample_time().
>>>>
>>>> Later, at post processing time, perf report/script will fetch
>>>> the time from perf file header.
>>>
>>> So, at this point I was expecting that that record would be present on
>>> the perf.data file:
>>>
>>> [acme@...et perf]$ perf record --timestamp-boundary sleep 1
>>> Cannot read kernel map
>>> [ perf record: Woken up 1 times to write data ]
>>> [ perf record: Captured and wrote 0.001 MB perf.data (7 samples) ]
>>> [acme@...et perf]$ perf report -D | grep PERF_RECORD_SAMPLE | wc -l
>>> 7
>>> [acme@...et perf]$ perf report -D | grep PERF_RECORD_SAMPLE_TIME
>>> [acme@...et perf]$
>>>
>>> What am I doing wrong?
>>>
>>> To clarify, this is with just the first two patches in this series
>>> applied.
>>>
>>> - Arnaldo
>>
>> Hi Arnaldo,
>>
>> The timestamp boundary information is saved in perf file header.
> 
> Right, my bad, I somehow thought it would be as PERF_RECORD_SAMPLE_TIME,
> duh.
> 
> Will continue reviewing, sorry about that.
> 
> - Arnaldo
>   

Thanks for reviewing the patch.

If you see anything I should improve, please let me know.

Thanks
Jin Yao

>> So if we want to look at them, we need to add '--header' in perf report.
>>
>> For example,
>>
>> root@skl:/tmp# perf report -D --header | grep 'time of'
>> # time of first sample : 248333.706656
>> # time of last sample : 248357.215328
>>
>> Thanks
>> Jin Yao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ