All of lore.kernel.org
 help / color / mirror / Atom feed
* [for-next][PATCH 0/4] tracing: Minor updates
@ 2015-05-14 15:07 Steven Rostedt
  2015-05-14 15:07 ` [for-next][PATCH 1/4] tracing: remove unused ftrace_output_event() prototype Steven Rostedt
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Steven Rostedt @ 2015-05-14 15:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
for-next

Head SHA1: f267caab44451baa70d25fa3191a68bb79ad1b08


Drew Richardson (1):
      ftrace: Provide trace clock monotonic raw

Jerry Snitselaar (1):
      tracing: Export tracing clock functions

Nicolas Iooss (1):
      tracing: remove unused ftrace_output_event() prototype

Steven Rostedt (Red Hat) (1):
      tracing: Remove unused prototype ftrace_event_define_field()

----
 include/linux/ftrace_event.h | 11 -----------
 kernel/trace/trace.c         |  1 +
 kernel/trace/trace_clock.c   |  3 +++
 3 files changed, 4 insertions(+), 11 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [for-next][PATCH 1/4] tracing: remove unused ftrace_output_event() prototype
  2015-05-14 15:07 [for-next][PATCH 0/4] tracing: Minor updates Steven Rostedt
@ 2015-05-14 15:07 ` Steven Rostedt
  2015-05-14 15:07 ` [for-next][PATCH 2/4] tracing: Export tracing clock functions Steven Rostedt
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2015-05-14 15:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, Nicolas Iooss

[-- Attachment #1: 0001-tracing-remove-unused-ftrace_output_event-prototype.patch --]
[-- Type: text/plain, Size: 1174 bytes --]

From: Nicolas Iooss <nicolas.iooss_linux@m4x.org>

The prototype of ftrace_output_event was added by commit 1d6bae966e90
("tracing: Move raw output code from macro to standalone function")
but this function was not defined anywhere, and is still nowhere to be
found.

Link: http://lkml.kernel.org/r/1430648282-25792-1-git-send-email-nicolas.iooss_linux@m4x.org

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 include/linux/ftrace_event.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index f9ecf63d47f1..65ce6de91307 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -219,9 +219,6 @@ struct ftrace_event_class {
 extern int ftrace_event_reg(struct ftrace_event_call *event,
 			    enum trace_reg type, void *data);
 
-int ftrace_output_event(struct trace_iterator *iter, struct ftrace_event_call *event,
-			char *fmt, ...);
-
 int ftrace_event_define_field(struct ftrace_event_call *call,
 			      char *type, int len, char *item, int offset,
 			      int field_size, int sign, int filter);
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [for-next][PATCH 2/4] tracing: Export tracing clock functions
  2015-05-14 15:07 [for-next][PATCH 0/4] tracing: Minor updates Steven Rostedt
  2015-05-14 15:07 ` [for-next][PATCH 1/4] tracing: remove unused ftrace_output_event() prototype Steven Rostedt
@ 2015-05-14 15:07 ` Steven Rostedt
  2015-05-14 15:07 ` [for-next][PATCH 3/4] ftrace: Provide trace clock monotonic raw Steven Rostedt
  2015-05-14 15:07 ` [for-next][PATCH 4/4] tracing: Remove unused prototype ftrace_event_define_field() Steven Rostedt
  3 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2015-05-14 15:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, Jerry Snitselaar

[-- Attachment #1: 0002-tracing-Export-tracing-clock-functions.patch --]
[-- Type: text/plain, Size: 1498 bytes --]

From: Jerry Snitselaar <jsnitsel@redhat.com>

Critical tracepoint hooks should never call anything that takes a lock,
so they are unable to call getrawmonotonic() or ktime_get().

Export the rest of the tracing clock functions so can be used in
tracepoint hooks.

Background: We have a customer that adds their own module and registers
a tracepoint hook to sched_wakeup. They were using ktime_get() for a
time source, but it grabs a seq lock and caused a deadlock to occur.

Link: http://lkml.kernel.org/r/1430406624-22609-1-git-send-email-jsnitsel@redhat.com

Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace_clock.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/trace/trace_clock.c b/kernel/trace/trace_clock.c
index 57b67b1f24d1..0f06532a755b 100644
--- a/kernel/trace/trace_clock.c
+++ b/kernel/trace/trace_clock.c
@@ -56,6 +56,7 @@ u64 notrace trace_clock(void)
 {
 	return local_clock();
 }
+EXPORT_SYMBOL_GPL(trace_clock);
 
 /*
  * trace_jiffy_clock(): Simply use jiffies as a clock counter.
@@ -68,6 +69,7 @@ u64 notrace trace_clock_jiffies(void)
 {
 	return jiffies_64_to_clock_t(jiffies_64 - INITIAL_JIFFIES);
 }
+EXPORT_SYMBOL_GPL(trace_clock_jiffies);
 
 /*
  * trace_clock_global(): special globally coherent trace clock
@@ -123,6 +125,7 @@ u64 notrace trace_clock_global(void)
 
 	return now;
 }
+EXPORT_SYMBOL_GPL(trace_clock_global);
 
 static atomic64_t trace_counter;
 
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [for-next][PATCH 3/4] ftrace: Provide trace clock monotonic raw
  2015-05-14 15:07 [for-next][PATCH 0/4] tracing: Minor updates Steven Rostedt
  2015-05-14 15:07 ` [for-next][PATCH 1/4] tracing: remove unused ftrace_output_event() prototype Steven Rostedt
  2015-05-14 15:07 ` [for-next][PATCH 2/4] tracing: Export tracing clock functions Steven Rostedt
@ 2015-05-14 15:07 ` Steven Rostedt
  2015-05-14 15:07 ` [for-next][PATCH 4/4] tracing: Remove unused prototype ftrace_event_define_field() Steven Rostedt
  3 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2015-05-14 15:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Thomas Gleixner, Peter Zijlstra,
	John Stultz, Mathieu Desnoyers, Drew Richardson

[-- Attachment #1: 0003-ftrace-Provide-trace-clock-monotonic-raw.patch --]
[-- Type: text/plain, Size: 2140 bytes --]

From: Drew Richardson <drew.richardson@arm.com>

Expose the NMI safe accessor to the monotonic raw clock to the
tracer. The mono clock was added with commit
1b3e5c0936046e7e023149ddc8946d21c2ea20eb. The advantage of the
monotonic raw clock is that it will advance more constantly than the
monotonic clock.

Imagine someone is trying to optimize a particular program to reduce
instructions executed for a given workload while minimizing the effect
on runtime. Also suppose that NTP is running and potentially making
larger adjustments to the monotonic clock. If NTP is adjusting the
monotonic clock to advance more rapidly, the program will appear to
use fewer instructions per second but run longer than if the monotonic
raw clock had been used. The total number of instructions observed
would be the same regardless of the clock source used, but how it's
attributed to time would be affected.

Conversely if NTP is adjusting the monotonic clock to advance more
slowly, the program will appear to use more instructions per second
but run more quickly. Of course there are many sources that can cause
jitter in performance measurements on modern processors, but let's
remove NTP from the list.

The monotonic raw clock can also be useful for tracing early boot,
e.g. when debugging issues with NTP.

Link: http://lkml.kernel.org/r/20150508143037.GB1276@dreric01-Precision-T1650

Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: John Stultz <john.stultz@linaro.org>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 05330494a0df..458031c31a37 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -876,6 +876,7 @@ static struct {
 	{ trace_clock_jiffies,		"uptime",	0 },
 	{ trace_clock,			"perf",		1 },
 	{ ktime_get_mono_fast_ns,	"mono",		1 },
+	{ ktime_get_raw_fast_ns,	"mono_raw",	1 },
 	ARCH_TRACE_CLOCKS
 };
 
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [for-next][PATCH 4/4] tracing: Remove unused prototype ftrace_event_define_field()
  2015-05-14 15:07 [for-next][PATCH 0/4] tracing: Minor updates Steven Rostedt
                   ` (2 preceding siblings ...)
  2015-05-14 15:07 ` [for-next][PATCH 3/4] ftrace: Provide trace clock monotonic raw Steven Rostedt
@ 2015-05-14 15:07 ` Steven Rostedt
  3 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2015-05-14 15:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton

[-- Attachment #1: 0004-tracing-Remove-unused-prototype-ftrace_event_define_.patch --]
[-- Type: text/plain, Size: 1288 bytes --]

From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>

ftrace_event_define_field() has a prototype defined but never used.
Remove it.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 include/linux/ftrace_event.h | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index 65ce6de91307..f8465d65f3c7 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -219,10 +219,6 @@ struct ftrace_event_class {
 extern int ftrace_event_reg(struct ftrace_event_call *event,
 			    enum trace_reg type, void *data);
 
-int ftrace_event_define_field(struct ftrace_event_call *call,
-			      char *type, int len, char *item, int offset,
-			      int field_size, int sign, int filter);
-
 struct ftrace_event_buffer {
 	struct ring_buffer		*buffer;
 	struct ring_buffer_event	*event;
@@ -238,10 +234,6 @@ void *ftrace_event_buffer_reserve(struct ftrace_event_buffer *fbuffer,
 
 void ftrace_event_buffer_commit(struct ftrace_event_buffer *fbuffer);
 
-int ftrace_event_define_field(struct ftrace_event_call *call,
-			      char *type, int len, char *item, int offset,
-			      int field_size, int sign, int filter);
-
 enum {
 	TRACE_EVENT_FL_FILTERED_BIT,
 	TRACE_EVENT_FL_CAP_ANY_BIT,
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-05-14 15:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-14 15:07 [for-next][PATCH 0/4] tracing: Minor updates Steven Rostedt
2015-05-14 15:07 ` [for-next][PATCH 1/4] tracing: remove unused ftrace_output_event() prototype Steven Rostedt
2015-05-14 15:07 ` [for-next][PATCH 2/4] tracing: Export tracing clock functions Steven Rostedt
2015-05-14 15:07 ` [for-next][PATCH 3/4] ftrace: Provide trace clock monotonic raw Steven Rostedt
2015-05-14 15:07 ` [for-next][PATCH 4/4] tracing: Remove unused prototype ftrace_event_define_field() Steven Rostedt

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.