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


Groups > linux.kernel > #1736770

Re: [PATCH v1 1/6] perf record: Record the first sample time and last sample time to perf file header

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v1 1/6] perf record: Record the first sample time and last sample time to perf file header
Date Thu, 21 Sep 2017 17:30:01 +0200
Message-ID <usbAl-2Ne-1@gated-at.bofh.it> (permalink)
References <urHsB-8f3-7@gated-at.bofh.it> <urHsB-8f3-15@gated-at.bofh.it> <usbqG-2Ji-7@gated-at.bofh.it>
X-Original-To Jin Yao <yao.jin@linux.intel.com>
Dmarc-Filter OpenDMARC Filter v1.3.2 mx1.redhat.com 1266F5F7BD
Authentication-Results ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jolsa@redhat.com
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.9.0 (2017-09-02)
X-Scanned-By MIMEDefang 2.79 on 10.5.11.15
X-Greylist Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 21 Sep 2017 15:21:13 +0000 (UTC)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 30
Organization linux.* mail to news gateway
X-Original-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
X-Original-Date Thu, 21 Sep 2017 17:21:10 +0200
X-Original-Message-ID <20170921152110.GC6579@krava>
X-Original-References <1505920357-25561-1-git-send-email-yao.jin@linux.intel.com> <1505920357-25561-2-git-send-email-yao.jin@linux.intel.com> <20170921151842.GB6579@krava>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1736770

Show key headers only | View raw


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

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


Thread

[PATCH v1 0/6] perf report/script: Support percent and multiple range in --time option Jin Yao <yao.jin@linux.intel.com> - 2017-09-20 09:20 +0200
  [PATCH v1 1/6] perf record: Record the first sample time and last sample time to perf file header Jin Yao <yao.jin@linux.intel.com> - 2017-09-20 09:20 +0200
    Re: [PATCH v1 1/6] perf record: Record the first sample time and  last sample time to perf file header Jiri Olsa <jolsa@redhat.com> - 2017-09-21 17:20 +0200
    Re: [PATCH v1 1/6] perf record: Record the first sample time and  last sample time to perf file header Jiri Olsa <jolsa@redhat.com> - 2017-09-21 17:20 +0200
      Re: [PATCH v1 1/6] perf record: Record the first sample time and  last sample time to perf file header Jiri Olsa <jolsa@redhat.com> - 2017-09-21 17:30 +0200
        Re: [PATCH v1 1/6] perf record: Record the first sample time and last  sample time to perf file header "Jin, Yao" <yao.jin@linux.intel.com> - 2017-09-22 02:50 +0200
  [PATCH v1 6/6] perf script: support time percent and multiple time ranges Jin Yao <yao.jin@linux.intel.com> - 2017-09-20 09:20 +0200
  [PATCH v1 2/6] perf Documentation: Update perf.data-file-format.txt Jin Yao <yao.jin@linux.intel.com> - 2017-09-20 09:20 +0200

csiph-web