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


Groups > linux.kernel > #1730610 > unrolled thread

Re: [PATCH v2 38/40] tracing: Make tracing_set_clock() non-static

Started byMasami Hiramatsu <mhiramat@kernel.org>
First post2017-09-12 04:20 +0200
Last post2017-09-12 16:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2 38/40] tracing: Make tracing_set_clock() non-static Masami Hiramatsu <mhiramat@kernel.org> - 2017-09-12 04:20 +0200
    Re: [PATCH v2 38/40] tracing: Make tracing_set_clock() non-static Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-09-12 16:20 +0200

#1730610 — Re: [PATCH v2 38/40] tracing: Make tracing_set_clock() non-static

FromMasami Hiramatsu <mhiramat@kernel.org>
Date2017-09-12 04:20 +0200
SubjectRe: [PATCH v2 38/40] tracing: Make tracing_set_clock() non-static
Message-ID<uoIXT-3tO-3@gated-at.bofh.it>
On Tue,  5 Sep 2017 16:57:50 -0500
Tom Zanussi <tom.zanussi@linux.intel.com> wrote:

> Allow tracing code outside of trace.c to access tracing_set_clock().
> 
> Some applications may require a particular clock in order to function
> properly, such as latency calculations.
> 
> Also, add an accessor returning the current clock string.

It seems this patch should be merged in the next patch, which
is actual consumer of this API.

Thank you,

> 
> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
> ---
>  kernel/trace/trace.c | 2 +-
>  kernel/trace/trace.h | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index d40839d..ecdf456 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -6207,7 +6207,7 @@ static int tracing_clock_show(struct seq_file *m, void *v)
>  	return 0;
>  }
>  
> -static int tracing_set_clock(struct trace_array *tr, const char *clockstr)
> +int tracing_set_clock(struct trace_array *tr, const char *clockstr)
>  {
>  	int i;
>  
> diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
> index 7b78762..1f3443a 100644
> --- a/kernel/trace/trace.h
> +++ b/kernel/trace/trace.h
> @@ -288,6 +288,7 @@ enum {
>  extern void trace_array_put(struct trace_array *tr);
>  
>  extern int tracing_set_time_stamp_abs(struct trace_array *tr, bool abs);
> +extern int tracing_set_clock(struct trace_array *tr, const char *clockstr);
>  
>  extern bool trace_clock_in_ns(struct trace_array *tr);
>  
> -- 
> 1.9.3
> 


-- 
Masami Hiramatsu <mhiramat@kernel.org>

[toc] | [next] | [standalone]


#1730876

FromTom Zanussi <tom.zanussi@linux.intel.com>
Date2017-09-12 16:20 +0200
Message-ID<uoUcF-2jr-13@gated-at.bofh.it>
In reply to#1730610
On Tue, 2017-09-12 at 11:18 +0900, Masami Hiramatsu wrote:
> On Tue,  5 Sep 2017 16:57:50 -0500
> Tom Zanussi <tom.zanussi@linux.intel.com> wrote:
> 
> > Allow tracing code outside of trace.c to access tracing_set_clock().
> > 
> > Some applications may require a particular clock in order to function
> > properly, such as latency calculations.
> > 
> > Also, add an accessor returning the current clock string.
> 
> It seems this patch should be merged in the next patch, which
> is actual consumer of this API.
> 

Yeah, that might make more sense in this case.

Thanks,

Tom

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web