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:   Fri, 22 Sep 2017 08:46:27 +0800
From:   "Jin, Yao" <yao.jin@...ux.intel.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     acme@...nel.org, 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 v1 1/6] perf record: Record the first sample time and last
 sample time to perf file header



On 9/21/2017 11:21 PM, Jiri Olsa wrote:
> On Thu, Sep 21, 2017 at 05:18:42PM +0200, Jiri Olsa wrote:
>> On Wed, Sep 20, 2017 at 11:12:32PM +0800, Jin Yao wrote:
>>
>> SNIP
>>
>>> @@ -2647,11 +2681,22 @@ int perf_file_header__read(struct perf_file_header *header,
>>>  
>>>  	if (header->size != sizeof(*header)) {
>>>  		/* Support the previous format */
>>> -		if (header->size == offsetof(typeof(*header), adds_features))
>>> +		if (header->size == offsetof(typeof(*header), adds_features)) {
>>>  			bitmap_zero(header->adds_features, HEADER_FEAT_BITS);
>>> -		else
>>> +			header->first_sample_time = 0;
>>> +			header->last_sample_time = 0;
>>> +			format_feature = false;
>>> +			format_time = false;
>>> +		} else if (header->size == offsetof(typeof(*header),
>>> +				first_sample_time)) {
>>> +			header->first_sample_time = 0;
>>> +			header->last_sample_time = 0;
>>> +			format_time = false;
>>> +		} else
>>
>> ok, disregard my previou comment.. I should have read the full patch first ;-)
> 
> still using the feature looks better to me.. I think we could
> add some generic TLV data feature for cases like this
> 
> jirka
> 

Thanks for the comments!

I will check how to add generic TLV data feature to record the first sample time and last sample time.

Thanks
Jin Yao


Powered by blists - more mailing lists