From: Jiri Olsa <jolsa@redhat.com>
To: Jin Yao <yao.jin@linux.intel.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: Thu, 21 Sep 2017 17:17:36 +0200 [thread overview]
Message-ID: <20170921151736.GA6579@krava> (raw)
In-Reply-To: <1505920357-25561-2-git-send-email-yao.jin@linux.intel.com>
On Wed, Sep 20, 2017 at 11:12:32PM +0800, Jin Yao wrote:
SNIP
> @@ -2686,6 +2731,11 @@ int perf_file_header__read(struct perf_file_header *header,
> }
> }
>
> + if (ph->needs_swap && format_time) {
> + header->first_sample_time = bswap_64(header->first_sample_time);
> + header->last_sample_time = bswap_64(header->last_sample_time);
> + }
> +
> memcpy(&ph->adds_features, &header->adds_features,
> sizeof(ph->adds_features));
>
> @@ -2942,6 +2992,9 @@ int perf_session__read_header(struct perf_session *session)
> lseek(fd, tmp, SEEK_SET);
> }
>
> + session->first_sample_time = f_header.first_sample_time;
> + session->last_sample_time = f_header.last_sample_time;
> +
> symbol_conf.nr_events = nr_attrs;
>
> perf_header__process_sections(header, fd, &session->tevent,
> diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h
> index f7a16ee..cba51e8 100644
> --- a/tools/perf/util/header.h
> +++ b/tools/perf/util/header.h
> @@ -56,6 +56,8 @@ struct perf_file_header {
> /* event_types is ignored */
> struct perf_file_section event_types;
> DECLARE_BITMAP(adds_features, HEADER_FEAT_BITS);
> + u64 first_sample_time;
> + u64 last_sample_time;
you can't add it here just like that, because you lose the
backward compatibility.. you need to add new feature
jirka
next prev parent reply other threads:[~2017-09-21 15:17 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 [this message]
2017-09-21 15:18 ` Jiri Olsa
2017-09-21 15:21 ` Jiri Olsa
2017-09-22 0:46 ` Jin, Yao
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=20170921151736.GA6579@krava \
--to=jolsa@redhat.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=kan.liang@intel.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=yao.jin@intel.com \
--cc=yao.jin@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).