All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jin, Yao" <yao.jin@linux.intel.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org,
	mingo@redhat.com, alexander.shishkin@linux.intel.com,
	Linux-kernel@vger.kernel.org, ak@linux.intel.com,
	kan.liang@intel.com, yao.jin@intel.com
Subject: Re: [PATCH v1 1/6] perf record: Record the first sample time and last sample time to perf file header
Date: Fri, 22 Sep 2017 08:46:27 +0800	[thread overview]
Message-ID: <de9e3ccd-e96d-b22d-2c83-2d42bb804c72@linux.intel.com> (raw)
In-Reply-To: <20170921152110.GC6579@krava>



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

  reply	other threads:[~2017-09-22  0:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-20 15:12 [PATCH v1 0/6] perf report/script: Support percent and multiple range in --time option Jin Yao
2017-09-20 15:12 ` [PATCH v1 1/6] perf record: Record the first sample time and last sample time to perf file header Jin Yao
2017-09-21 15:17   ` Jiri Olsa
2017-09-21 15:18   ` Jiri Olsa
2017-09-21 15:21     ` Jiri Olsa
2017-09-22  0:46       ` Jin, Yao [this message]
2017-09-20 15:12 ` [PATCH v1 2/6] perf Documentation: Update perf.data-file-format.txt Jin Yao
2017-09-20 15:12 ` [PATCH v1 3/6] perf util: Create function to parse time percent Jin Yao
2017-09-20 15:12 ` [PATCH v1 4/6] perf util: Create function to perform multiple time range checking Jin Yao
2017-09-20 15:12 ` [PATCH v1 5/6] perf report: support time percent and multiple time ranges Jin Yao
2017-09-20 15:12 ` [PATCH v1 6/6] perf script: " Jin Yao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=de9e3ccd-e96d-b22d-2c83-2d42bb804c72@linux.intel.com \
    --to=yao.jin@linux.intel.com \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=kan.liang@intel.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=yao.jin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.