lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161128181441.GA11055@krava>
Date:   Mon, 28 Nov 2016 19:14:41 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     David Ahern <dsahern@...il.com>
Cc:     David Ahern <dsa@...ulusnetworks.com>, acme@...nel.org,
        mingo@...nel.org, peterz@...radead.org, namhyung@...nel.org,
        jolsa@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/6] perf tool: Add time-based utility functions

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@...il.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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ