lkml.org 
[lkml]   [2017]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/6] perf header: Record first sample time and last sample time in perf file header
On Thu, Sep 28, 2017 at 08:45:16PM +0800, Jin Yao wrote:

SNIP

> + return ret;
> +
> + return do_write(ff, &evlist->last_sample_time,
> + sizeof(evlist->last_sample_time));
> +}
> +
> static void print_hostname(struct feat_fd *ff, FILE *fp)
> {
> fprintf(fp, "# hostname : %s\n", ff->ph->env.hostname);
> @@ -1506,6 +1520,19 @@ static void print_group_desc(struct feat_fd *ff, FILE *fp)
> }
> }
>
> +static void print_sample_time(struct feat_fd *ff, FILE *fp)
> +{
> + struct perf_session *session;
> +
> + session = container_of(ff->ph, struct perf_session, header);
> +
> + fprintf(fp, "# time of first sample : %" PRIu64 "\n",
> + session->evlist->first_sample_time);
> +
> + fprintf(fp, "# time of last sample : %" PRIu64 "\n",
> + session->evlist->last_sample_time);

this could be done in some follow up patch, but could we
display this in some human readable way..

# time of first sample : 218077073264620
# time of last sample : 218077073395488

jirka

\
 
 \ /
  Last update: 2017-10-02 13:52    [W:0.087 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site