From: Jiri Olsa <jolsa@redhat.com>
To: David Ahern <dsahern@gmail.com>
Cc: David Ahern <dsa@cumulusnetworks.com>,
acme@kernel.org, mingo@kernel.org, peterz@infradead.org,
namhyung@kernel.org, jolsa@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/6] perf tool: Add time-based utility functions
Date: Mon, 28 Nov 2016 19:14:41 +0100 [thread overview]
Message-ID: <20161128181441.GA11055@krava> (raw)
In-Reply-To: <1edb9bd4-5697-47d4-9ca1-5f359fa00ac4@gmail.com>
On Mon, Nov 28, 2016 at 10:35:15AM -0700, David Ahern wrote:
> On 11/28/16 6:58 AM, Jiri Olsa wrote:
> > On Fri, Nov 25, 2016 at 02:39:54PM -0700, David Ahern wrote:
> >> From: David Ahern <dsahern@gmail.com>
> >>
> >> Add function to parse a user time string of the form <start>,<stop>
> >> where start and stop are time in sec.nsec format. Both start and stop
> >> times are optional.
> >>
> >> Add function to determine if a sample time is within a given time
> >> time window of interest.
> >>
> >> Signed-off-by: David Ahern <dsahern@gmail.com>
> >> ---
> >> tools/perf/util/Build | 1 +
> >> tools/perf/util/time-utils.c | 85 ++++++++++++++++++++++++++++++++++++++++++++
> >> tools/perf/util/time-utils.h | 12 +++++++
> >> 3 files changed, 98 insertions(+)
> >> create mode 100644 tools/perf/util/time-utils.c
> >> create mode 100644 tools/perf/util/time-utils.h
> >>
> >> diff --git a/tools/perf/util/Build b/tools/perf/util/Build
> >> index 1dc67efad634..78f139978e7a 100644
> >> --- a/tools/perf/util/Build
> >> +++ b/tools/perf/util/Build
> >> @@ -87,6 +87,7 @@ libperf-y += help-unknown-cmd.o
> >> libperf-y += mem-events.o
> >> libperf-y += vsprintf.o
> >> libperf-y += drv_configs.o
> >> +libperf-y += time-utils.o
> >
> > I think we should call it just time.c, it's already in 'util' directory
>
> can't rename time-utils.h to time.h because the include will get confused with <time.h> and if the header is named time-utils.h why not keep the c-file as time-utils.c?
>
ok, haven't realized that.. can't think of another name ;-)
there are some time related functions in util.[ch], maybe you
coudl move them as well
int fetch_current_timestamp(char *buf, size_t sz);
int timestamp__scnprintf_usec(u64 timestamp, char *buf, size_t sz);
jirka
next prev parent reply other threads:[~2016-11-28 18:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-25 21:39 [PATCH 0/6] perf: Add option to specify time window of interest David Ahern
2016-11-25 21:39 ` [PATCH 1/6] perf tool: Add time-based utility functions David Ahern
2016-11-28 13:58 ` Jiri Olsa
2016-11-28 17:35 ` David Ahern
2016-11-28 18:14 ` Jiri Olsa [this message]
2016-11-28 18:17 ` David Ahern
2016-11-28 13:58 ` Jiri Olsa
2016-11-28 13:58 ` Jiri Olsa
2016-11-28 17:27 ` David Ahern
2016-11-29 16:02 ` Arnaldo Carvalho de Melo
2016-11-29 16:03 ` David Ahern
2016-11-25 21:39 ` [PATCH 2/6] perf tool: Move parse_nsec_time to time-utils.c David Ahern
2016-11-28 13:58 ` Jiri Olsa
2016-11-28 17:31 ` David Ahern
2016-11-25 21:39 ` [PATCH 3/6] perf script: Add option to specify time window of interest David Ahern
2016-11-25 21:39 ` [PATCH 4/6] perf sched timehist: " David Ahern
2016-11-25 21:39 ` [PATCH 5/6] perf kmem: " David Ahern
2016-11-25 21:39 ` [PATCH 6/6] perf report: " David Ahern
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=20161128181441.GA11055@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=dsa@cumulusnetworks.com \
--cc=dsahern@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/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.