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


Groups > linux.kernel > #1531320

Re: [PATCH 2/6] perf tool: Move parse_nsec_time to time-utils.c

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/6] perf tool: Move parse_nsec_time to time-utils.c
Date 2016-11-28 15:00 +0100
Message-ID <sIuDo-2Mu-9@gated-at.bofh.it> (permalink)
References <sHwxz-5Zv-9@gated-at.bofh.it> <sHwxz-5Zv-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Nov 25, 2016 at 02:39:55PM -0700, David Ahern wrote:

SNIP

> -
> -		time_nsec = strtoul(nsec_buf, &end, 10);
> -		if (*end != '\0')
> -			return -1;
> -	} else
> -		time_nsec = 0;
> -
> -	*ptime = time_sec * NSEC_PER_SEC + time_nsec;
> -	return 0;
> -}
> -
>  int timestamp__scnprintf_usec(u64 timestamp, char *buf, size_t sz)
>  {
>  	u64  sec = timestamp / NSEC_PER_SEC;
> diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
> index 79662d67891e..1d639e38aa82 100644
> --- a/tools/perf/util/util.h
> +++ b/tools/perf/util/util.h
> @@ -179,8 +179,6 @@ static inline void *zalloc(size_t size)
>  #undef tolower
>  #undef toupper
>  
> -int parse_nsec_time(const char *str, u64 *ptime);

strange, can't see any current user of this function other than in your patch

could you please also add some automated tests for this function?

thanks,
jirka

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


Thread

[PATCH 2/6] perf tool: Move parse_nsec_time to time-utils.c David Ahern <dsa@cumulusnetworks.com> - 2016-11-25 22:50 +0100
  Re: [PATCH 2/6] perf tool: Move parse_nsec_time to time-utils.c Jiri Olsa <jolsa@redhat.com> - 2016-11-28 15:00 +0100
    Re: [PATCH 2/6] perf tool: Move parse_nsec_time to time-utils.c David Ahern <dsahern@gmail.com> - 2016-11-28 18:40 +0100

csiph-web