Linux-Trace-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement
@ 2019-09-19 21:23 Steven Rostedt
  2019-09-19 21:23 ` [PATCH 1/6] tools/lib/traceevent: Man pages for libtraceevent event print related API Steven Rostedt
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Steven Rostedt @ 2019-09-19 21:23 UTC (permalink / raw)
  To: linux-kernel, linux-trace-devel
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, Jiri Olsa, Namhyung Kim,
	Andrew Morton

Hi Arnaldo,

This is a series of man page updates to the libtraceevent code, as
well as a fix to one missing prototype and some movement of the location
of the plugins (to have the plugins in their own directory).

-- Steve




Tzvetomir Stoyanov (2):
      tools/lib/traceevent: Man pages for libtraceevent event print related API
      tools/lib/traceevent: Man pages for tep plugins APIs

Tzvetomir Stoyanov (VMware) (4):
      tools/lib/traceevent: Man pages fix, rename tep_ref_get() to tep_get_ref()
      tools/lib/traceevent: Man pages fix, changes in event printing APIs
      tools/lib/traceevent: Add tep_get_event() in event-parse.h
      tools/lib/traceevent: Move traceevent plugins in its own subdirectory

----
 tools/lib/traceevent/Build                         |  11 -
 .../Documentation/libtraceevent-event_print.txt    | 130 ++++++++++++
 .../Documentation/libtraceevent-handle.txt         |   8 +-
 .../Documentation/libtraceevent-plugins.txt        |  99 +++++++++
 .../lib/traceevent/Documentation/libtraceevent.txt |  15 +-
 tools/lib/traceevent/Makefile                      |  94 ++-------
 tools/lib/traceevent/event-parse.h                 |   2 +
 tools/lib/traceevent/plugins/Build                 |  10 +
 tools/lib/traceevent/plugins/Makefile              | 222 +++++++++++++++++++++
 .../lib/traceevent/{ => plugins}/plugin_cfg80211.c |   0
 .../lib/traceevent/{ => plugins}/plugin_function.c |   0
 .../lib/traceevent/{ => plugins}/plugin_hrtimer.c  |   0
 tools/lib/traceevent/{ => plugins}/plugin_jbd2.c   |   0
 tools/lib/traceevent/{ => plugins}/plugin_kmem.c   |   0
 tools/lib/traceevent/{ => plugins}/plugin_kvm.c    |   0
 .../lib/traceevent/{ => plugins}/plugin_mac80211.c |   0
 .../traceevent/{ => plugins}/plugin_sched_switch.c |   0
 tools/lib/traceevent/{ => plugins}/plugin_scsi.c   |   0
 tools/lib/traceevent/{ => plugins}/plugin_xen.c    |   0
 19 files changed, 485 insertions(+), 106 deletions(-)
 create mode 100644 tools/lib/traceevent/Documentation/libtraceevent-event_print.txt
 create mode 100644 tools/lib/traceevent/Documentation/libtraceevent-plugins.txt
 create mode 100644 tools/lib/traceevent/plugins/Build
 create mode 100644 tools/lib/traceevent/plugins/Makefile
 rename tools/lib/traceevent/{ => plugins}/plugin_cfg80211.c (100%)
 rename tools/lib/traceevent/{ => plugins}/plugin_function.c (100%)
 rename tools/lib/traceevent/{ => plugins}/plugin_hrtimer.c (100%)
 rename tools/lib/traceevent/{ => plugins}/plugin_jbd2.c (100%)
 rename tools/lib/traceevent/{ => plugins}/plugin_kmem.c (100%)
 rename tools/lib/traceevent/{ => plugins}/plugin_kvm.c (100%)
 rename tools/lib/traceevent/{ => plugins}/plugin_mac80211.c (100%)
 rename tools/lib/traceevent/{ => plugins}/plugin_sched_switch.c (100%)
 rename tools/lib/traceevent/{ => plugins}/plugin_scsi.c (100%)
 rename tools/lib/traceevent/{ => plugins}/plugin_xen.c (100%)

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

* [PATCH 1/6] tools/lib/traceevent: Man pages for libtraceevent event print related API
  2019-09-19 21:23 [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement Steven Rostedt
@ 2019-09-19 21:23 ` Steven Rostedt
  2019-09-19 21:23 ` [PATCH 2/6] tools/lib/traceevent: Man pages fix, rename tep_ref_get() to tep_get_ref() Steven Rostedt
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Steven Rostedt @ 2019-09-19 21:23 UTC (permalink / raw)
  To: linux-kernel, linux-trace-devel
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, Jiri Olsa, Namhyung Kim,
	Andrew Morton, Tzvetomir Stoyanov

From: Tzvetomir Stoyanov <tstoyanov@vmware.com>

Added new man page, describing tep_print_event() libtraceevent API.

Link: http://lore.kernel.org/linux-trace-devel/20190801075012.22098-1-tz.stoyanov@gmail.com

Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 .../libtraceevent-event_print.txt             | 130 ++++++++++++++++++
 1 file changed, 130 insertions(+)
 create mode 100644 tools/lib/traceevent/Documentation/libtraceevent-event_print.txt

diff --git a/tools/lib/traceevent/Documentation/libtraceevent-event_print.txt b/tools/lib/traceevent/Documentation/libtraceevent-event_print.txt
new file mode 100644
index 000000000000..2c6a61811118
--- /dev/null
+++ b/tools/lib/traceevent/Documentation/libtraceevent-event_print.txt
@@ -0,0 +1,130 @@
+libtraceevent(3)
+================
+
+NAME
+----
+tep_print_event - Writes event information into a trace sequence.
+
+SYNOPSIS
+--------
+[verse]
+--
+*#include <event-parse.h>*
+*#include <trace-seq.h>*
+
+void *tep_print_event*(struct tep_handle pass:[*]_tep_, struct trace_seqpass:[*]_s_, struct tep_record pass:[*]_record_, const char pass:[*]_fmt_, _..._)
+--
+
+DESCRIPTION
+-----------
+
+The _tep_print_event()_ function parses the event information of the given
+_record_ and writes it into the trace sequence _s_, according to the format
+string _fmt_. The desired information is specified after the format string.
+The _fmt_ is printf-like format string, following arguments are supported:
+[verse]
+--
+	TEP_PRINT_PID, "%d"  - PID of the event.
+	TEP_PRINT_CPU, "%d"  - Event CPU.
+	TEP_PRINT_COMM, "%s" - Event command string.
+	TEP_PRINT_NAME, "%s" - Event name.
+	TEP_PRINT_LATENCY, "%s" - Latency of the event. It prints 4 or more
+			fields - interrupt state, scheduling state,
+			current context, and preemption count.
+			Field 1 is the interrupt enabled state:
+				d : Interrupts are disabled
+				. : Interrupts are enabled
+				X : The architecture does not support this
+				    information
+			Field 2 is the "need resched" state.
+				N : The task is set to call the scheduler when
+				    possible, as another higher priority task
+				    may need to be scheduled in.
+				. : The task is not set to call the scheduler.
+			Field 3 is the context state.
+				. : Normal context
+				s : Soft interrupt context
+				h : Hard interrupt context
+				H : Hard interrupt context which triggered
+				    during soft interrupt context.
+				z : NMI context
+				Z : NMI context which triggered during hard
+				    interrupt context
+			Field 4 is the preemption count.
+				. : The preempt count is zero.
+			On preemptible kernels (where the task can be scheduled
+			out in arbitrary locations while in kernel context), the
+			preempt count, when non zero, will prevent the kernel
+			from scheduling out the current task. The preempt count
+			number is displayed when it is not zero.
+			Depending on the kernel, it may show other fields
+			(lock depth, or migration disabled, which are unique to
+			specialized kernels).
+	TEP_PRINT_TIME, %d - event time stamp. A divisor and precision can be
+			specified as part of this format string:
+			"%precision.divisord". Example:
+			"%3.1000d" - divide the time by 1000 and print the first
+			3 digits before the dot. Thus, the time stamp
+			"123456000" will be printed as "123.456"
+	TEP_PRINT_INFO, "%s" - event information.
+	TEP_PRINT_INFO_RAW, "%s" - event information, in raw format.
+
+--
+EXAMPLE
+-------
+[source,c]
+--
+#include <event-parse.h>
+#include <trace-seq.h>
+...
+struct trace_seq seq;
+trace_seq_init(&seq);
+struct tep_handle *tep = tep_alloc();
+...
+void print_my_event(struct tep_record *record)
+{
+	trace_seq_reset(&seq);
+	tep_print_event(tep, s, record, "%16s-%-5d [%03d] %s %6.1000d %s %s",
+			TEP_PRINT_COMM, TEP_PRINT_PID, TEP_PRINT_CPU,
+			TEP_PRINT_LATENCY, TEP_PRINT_TIME, TEP_PRINT_NAME,
+			TEP_PRINT_INFO);
+}
+...
+--
+
+FILES
+-----
+[verse]
+--
+*event-parse.h*
+	Header file to include in order to have access to the library APIs.
+*trace-seq.h*
+	Header file to include in order to have access to trace sequences related APIs.
+	Trace sequences are used to allow a function to call several other functions
+	to create a string of data to use.
+*-ltraceevent*
+	Linker switch to add when building a program that uses the library.
+--
+
+SEE ALSO
+--------
+_libtraceevent(3)_, _trace-cmd(1)_
+
+AUTHOR
+------
+[verse]
+--
+*Steven Rostedt* <rostedt@goodmis.org>, author of *libtraceevent*.
+*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>, author of this man page.
+--
+REPORTING BUGS
+--------------
+Report bugs to  <linux-trace-devel@vger.kernel.org>
+
+LICENSE
+-------
+libtraceevent is Free Software licensed under the GNU LGPL 2.1
+
+RESOURCES
+---------
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
-- 
2.20.1



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

* [PATCH 2/6] tools/lib/traceevent: Man pages fix, rename tep_ref_get() to tep_get_ref()
  2019-09-19 21:23 [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement Steven Rostedt
  2019-09-19 21:23 ` [PATCH 1/6] tools/lib/traceevent: Man pages for libtraceevent event print related API Steven Rostedt
@ 2019-09-19 21:23 ` Steven Rostedt
  2019-09-19 21:23 ` [PATCH 3/6] tools/lib/traceevent: Man pages fix, changes in event printing APIs Steven Rostedt
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Steven Rostedt @ 2019-09-19 21:23 UTC (permalink / raw)
  To: linux-kernel, linux-trace-devel
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, Jiri Olsa, Namhyung Kim,
	Andrew Morton, Tzvetomir Stoyanov (VMware)

From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>

The tep_ref_get() was renamed to tep_get_ref(), to be more consistent with
the other tep_ref_* APIs. However, in the man pages the API is still with
the old name. The documentation is fixed to reflect the actual name of the API.

Link: http://lore.kernel.org/linux-trace-devel/20190808113636.13299-2-tz.stoyanov@gmail.com

Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 .../lib/traceevent/Documentation/libtraceevent-handle.txt | 8 ++++----
 tools/lib/traceevent/Documentation/libtraceevent.txt      | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/lib/traceevent/Documentation/libtraceevent-handle.txt b/tools/lib/traceevent/Documentation/libtraceevent-handle.txt
index 8d568316847d..45b20172e262 100644
--- a/tools/lib/traceevent/Documentation/libtraceevent-handle.txt
+++ b/tools/lib/traceevent/Documentation/libtraceevent-handle.txt
@@ -3,7 +3,7 @@ libtraceevent(3)
 
 NAME
 ----
-tep_alloc, tep_free,tep_ref, tep_unref,tep_ref_get - Create, destroy, manage
+tep_alloc, tep_free,tep_ref, tep_unref,tep_get_ref - Create, destroy, manage
 references of trace event parser context.
 
 SYNOPSIS
@@ -16,7 +16,7 @@ struct tep_handle pass:[*]*tep_alloc*(void);
 void *tep_free*(struct tep_handle pass:[*]_tep_);
 void *tep_ref*(struct tep_handle pass:[*]_tep_);
 void *tep_unref*(struct tep_handle pass:[*]_tep_);
-int *tep_ref_get*(struct tep_handle pass:[*]_tep_);
+int *tep_get_ref*(struct tep_handle pass:[*]_tep_);
 --
 
 DESCRIPTION
@@ -57,9 +57,9 @@ EXAMPLE
 ...
 struct tep_handle *tep = tep_alloc();
 ...
-int ref = tep_ref_get(tep);
+int ref = tep_get_ref(tep);
 tep_ref(tep);
-if ( (ref+1) != tep_ref_get(tep)) {
+if ( (ref+1) != tep_get_ref(tep)) {
 	/* Something wrong happened, the counter is not incremented by 1 */
 }
 tep_unref(tep);
diff --git a/tools/lib/traceevent/Documentation/libtraceevent.txt b/tools/lib/traceevent/Documentation/libtraceevent.txt
index fbd977b47de1..00519503c8de 100644
--- a/tools/lib/traceevent/Documentation/libtraceevent.txt
+++ b/tools/lib/traceevent/Documentation/libtraceevent.txt
@@ -16,7 +16,7 @@ Management of tep handler data structure and access of its members:
 	void *tep_free*(struct tep_handle pass:[*]_tep_);
 	void *tep_ref*(struct tep_handle pass:[*]_tep_);
 	void *tep_unref*(struct tep_handle pass:[*]_tep_);
-	int *tep_ref_get*(struct tep_handle pass:[*]_tep_);
+	int *tep_get_ref*(struct tep_handle pass:[*]_tep_);
 	void *tep_set_flag*(struct tep_handle pass:[*]_tep_, enum tep_flag _flag_);
 	void *tep_clear_flag*(struct tep_handle pass:[*]_tep_, enum tep_flag _flag_);
 	bool *tep_test_flag*(struct tep_handle pass:[*]_tep_, enum tep_flag _flags_);
-- 
2.20.1



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

* [PATCH 3/6] tools/lib/traceevent: Man pages fix, changes in event printing APIs
  2019-09-19 21:23 [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement Steven Rostedt
  2019-09-19 21:23 ` [PATCH 1/6] tools/lib/traceevent: Man pages for libtraceevent event print related API Steven Rostedt
  2019-09-19 21:23 ` [PATCH 2/6] tools/lib/traceevent: Man pages fix, rename tep_ref_get() to tep_get_ref() Steven Rostedt
@ 2019-09-19 21:23 ` Steven Rostedt
  2019-09-19 21:23 ` [PATCH 4/6] tools/lib/traceevent: Add tep_get_event() in event-parse.h Steven Rostedt
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Steven Rostedt @ 2019-09-19 21:23 UTC (permalink / raw)
  To: linux-kernel, linux-trace-devel
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, Jiri Olsa, Namhyung Kim,
	Andrew Morton, Tzvetomir Stoyanov (VMware)

From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>

APIs for printing various trace event information were redesigned to
be more simple. However, the main libtraceevent man page was not updated
with those changes. The documentation is updated to describe the new
event print API.

Link: http://lore.kernel.org/linux-trace-devel/20190808113636.13299-3-tz.stoyanov@gmail.com

Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 .../lib/traceevent/Documentation/libtraceevent.txt  | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/tools/lib/traceevent/Documentation/libtraceevent.txt b/tools/lib/traceevent/Documentation/libtraceevent.txt
index 00519503c8de..d530a7ce8fb2 100644
--- a/tools/lib/traceevent/Documentation/libtraceevent.txt
+++ b/tools/lib/traceevent/Documentation/libtraceevent.txt
@@ -26,15 +26,12 @@ Management of tep handler data structure and access of its members:
 	void *tep_set_long_size*(struct tep_handle pass:[*]_tep_, int _long_size_);
 	int *tep_get_page_size*(struct tep_handle pass:[*]_tep_);
 	void *tep_set_page_size*(struct tep_handle pass:[*]_tep_, int _page_size_);
-	bool *tep_is_latency_format*(struct tep_handle pass:[*]_tep_);
-	void *tep_set_latency_format*(struct tep_handle pass:[*]_tep_, int _lat_);
 	int *tep_get_header_page_size*(struct tep_handle pass:[*]_tep_);
 	int *tep_get_header_timestamp_size*(struct tep_handle pass:[*]_tep_);
 	bool *tep_is_old_format*(struct tep_handle pass:[*]_tep_);
 	int *tep_strerror*(struct tep_handle pass:[*]_tep_, enum tep_errno _errnum_, char pass:[*]_buf_, size_t _buflen_);
 
 Register / unregister APIs:
-	int *tep_register_trace_clock*(struct tep_handle pass:[*]_tep_, const char pass:[*]_trace_clock_);
 	int *tep_register_function*(struct tep_handle pass:[*]_tep_, char pass:[*]_name_, unsigned long long _addr_, char pass:[*]_mod_);
 	int *tep_register_event_handler*(struct tep_handle pass:[*]_tep_, int _id_, const char pass:[*]_sys_name_, const char pass:[*]_event_name_, tep_event_handler_func _func_, void pass:[*]_context_);
 	int *tep_unregister_event_handler*(struct tep_handle pass:[*]tep, int id, const char pass:[*]sys_name, const char pass:[*]event_name, tep_event_handler_func func, void pass:[*]_context_);
@@ -57,14 +54,7 @@ Event related APIs:
 	int *tep_get_events_count*(struct tep_handle pass:[*]_tep_);
 	struct tep_event pass:[*]pass:[*]*tep_list_events*(struct tep_handle pass:[*]_tep_, enum tep_event_sort_type _sort_type_);
 	struct tep_event pass:[*]pass:[*]*tep_list_events_copy*(struct tep_handle pass:[*]_tep_, enum tep_event_sort_type _sort_type_);
-
-Event printing:
-	void *tep_print_event*(struct tep_handle pass:[*]_tep_, struct trace_seq pass:[*]_s_, struct tep_record pass:[*]_record_, bool _use_trace_clock_);
-	void *tep_print_event_data*(struct tep_handle pass:[*]_tep_, struct trace_seq pass:[*]_s_, struct tep_event pass:[*]_event_, struct tep_record pass:[*]_record_);
-	void *tep_event_info*(struct trace_seq pass:[*]_s_, struct tep_event pass:[*]_event_, struct tep_record pass:[*]_record_);
-	void *tep_print_event_task*(struct tep_handle pass:[*]_tep_, struct trace_seq pass:[*]_s_, struct tep_event pass:[*]_event_, struct tep_record pass:[*]_record_);
-	void *tep_print_event_time*(struct tep_handle pass:[*]_tep_, struct trace_seq pass:[*]_s_, struct tep_event pass:[*]_event_, struct tep_record pass:[*]record, bool _use_trace_clock_);
-	void *tep_set_print_raw*(struct tep_handle pass:[*]_tep_, int _print_raw_);
+	void *tep_print_event*(struct tep_handle pass:[*]_tep_, struct trace_seq pass:[*]_s_, struct tep_record pass:[*]_record_, const char pass:[*]_fmt_, _..._);
 
 Event finding:
 	struct tep_event pass:[*]*tep_find_event*(struct tep_handle pass:[*]_tep_, int _id_);
@@ -116,7 +106,6 @@ Filter management:
 	int *tep_filter_compare*(struct tep_event_filter pass:[*]_filter1_, struct tep_event_filter pass:[*]_filter2_);
 
 Parsing various data from the records:
-	void *tep_data_latency_format*(struct tep_handle pass:[*]_tep_, struct trace_seq pass:[*]_s_, struct tep_record pass:[*]_record_);
 	int *tep_data_type*(struct tep_handle pass:[*]_tep_, struct tep_record pass:[*]_rec_);
 	int *tep_data_pid*(struct tep_handle pass:[*]_tep_, struct tep_record pass:[*]_rec_);
 	int *tep_data_preempt_count*(struct tep_handle pass:[*]_tep_, struct tep_record pass:[*]_rec_);
-- 
2.20.1



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

* [PATCH 4/6] tools/lib/traceevent: Add tep_get_event() in event-parse.h
  2019-09-19 21:23 [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement Steven Rostedt
                   ` (2 preceding siblings ...)
  2019-09-19 21:23 ` [PATCH 3/6] tools/lib/traceevent: Man pages fix, changes in event printing APIs Steven Rostedt
@ 2019-09-19 21:23 ` Steven Rostedt
  2019-09-19 21:23 ` [PATCH 5/6] tools/lib/traceevent: Man pages for tep plugins APIs Steven Rostedt
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Steven Rostedt @ 2019-09-19 21:23 UTC (permalink / raw)
  To: linux-kernel, linux-trace-devel
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, Jiri Olsa, Namhyung Kim,
	Andrew Morton, Tzvetomir Stoyanov (VMware)

From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>

The tep_get_event() function is an official libtracevent API, described
in the library man pages. However, it cannot be used by the library users because
it is not declared in the event-parse.h file, where all libtracevent APIs are.
The function declaration is added in event-parse.h file.

Link: http://lore.kernel.org/linux-trace-devel/20190808113721.13539-1-tz.stoyanov@gmail.com

Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 tools/lib/traceevent/event-parse.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
index d438ee44289f..b77837f75a0d 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -441,6 +441,8 @@ int tep_register_print_string(struct tep_handle *tep, const char *fmt,
 			      unsigned long long addr);
 bool tep_is_pid_registered(struct tep_handle *tep, int pid);
 
+struct tep_event *tep_get_event(struct tep_handle *tep, int index);
+
 #define TEP_PRINT_INFO		"INFO"
 #define TEP_PRINT_INFO_RAW	"INFO_RAW"
 #define TEP_PRINT_COMM		"COMM"
-- 
2.20.1



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

* [PATCH 5/6] tools/lib/traceevent: Man pages for tep plugins APIs
  2019-09-19 21:23 [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement Steven Rostedt
                   ` (3 preceding siblings ...)
  2019-09-19 21:23 ` [PATCH 4/6] tools/lib/traceevent: Add tep_get_event() in event-parse.h Steven Rostedt
@ 2019-09-19 21:23 ` Steven Rostedt
  2019-09-19 21:23 ` [PATCH 6/6] tools/lib/traceevent: Move traceevent plugins in its own subdirectory Steven Rostedt
  2019-09-23 14:28 ` [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement Arnaldo Carvalho de Melo
  6 siblings, 0 replies; 13+ messages in thread
From: Steven Rostedt @ 2019-09-19 21:23 UTC (permalink / raw)
  To: linux-kernel, linux-trace-devel
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, Jiri Olsa, Namhyung Kim,
	Andrew Morton, Tzvetomir Stoyanov

From: Tzvetomir Stoyanov <tstoyanov@vmware.com>

Create man pages for libtraceevent APIs:
  tep_load_plugins(),
  tep_unload_plugin()

Link: http://lore.kernel.org/linux-trace-devel/20190903133434.30417-1-tz.stoyanov@gmail.com

Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 .../Documentation/libtraceevent-plugins.txt   | 99 +++++++++++++++++++
 1 file changed, 99 insertions(+)
 create mode 100644 tools/lib/traceevent/Documentation/libtraceevent-plugins.txt

diff --git a/tools/lib/traceevent/Documentation/libtraceevent-plugins.txt b/tools/lib/traceevent/Documentation/libtraceevent-plugins.txt
new file mode 100644
index 000000000000..596032ade31f
--- /dev/null
+++ b/tools/lib/traceevent/Documentation/libtraceevent-plugins.txt
@@ -0,0 +1,99 @@
+libtraceevent(3)
+================
+
+NAME
+----
+tep_load_plugins, tep_unload_plugins - Load / unload traceevent plugins.
+
+SYNOPSIS
+--------
+[verse]
+--
+*#include <event-parse.h>*
+
+struct tep_plugin_list pass:[*]*tep_load_plugins*(struct tep_handle pass:[*]_tep_);
+void *tep_unload_plugins*(struct tep_plugin_list pass:[*]_plugin_list_, struct tep_handle pass:[*]_tep_);
+--
+
+DESCRIPTION
+-----------
+The _tep_load_plugins()_ function loads all plugins, located in the plugin
+directories. The _tep_ argument is trace event parser context.
+The plugin directories are :
+[verse]
+--
+	- System's plugin directory, defined at the library compile time. It
+	  depends on the library installation prefix and usually is
+	  _(install_preffix)/lib/traceevent/plugins_
+	- Directory, defined by the environment variable _TRACEEVENT_PLUGIN_DIR_
+	- User's plugin directory, located at _~/.local/lib/traceevent/plugins_
+--
+Loading of plugins can be controlled by the _tep_flags_, using the
+_tep_set_flag()_ API:
+[verse]
+--
+	_TEP_DISABLE_SYS_PLUGINS_	- do not load plugins, located in
+					the system's plugin directory.
+	_TEP_DISABLE_PLUGINS_		- do not load any plugins.
+--
+The _tep_set_flag()_ API needs to be called before _tep_load_plugins()_, if
+loading of all plugins is not the desired case.
+
+The _tep_unload_plugins()_ function unloads the plugins, previously loaded by
+_tep_load_plugins()_. The _tep_ argument is trace event parser context. The
+_plugin_list_ is the list of loaded plugins, returned by
+the _tep_load_plugins()_ function.
+
+RETURN VALUE
+------------
+The _tep_load_plugins()_ function returns a list of successfully loaded plugins,
+or NULL in case no plugins are loaded.
+
+EXAMPLE
+-------
+[source,c]
+--
+#include <event-parse.h>
+...
+struct tep_handle *tep = tep_alloc();
+...
+struct tep_plugin_list *plugins = tep_load_plugins(tep);
+if (plugins == NULL) {
+	/* no plugins are loaded */
+}
+...
+tep_unload_plugins(plugins, tep);
+--
+
+FILES
+-----
+[verse]
+--
+*event-parse.h*
+	Header file to include in order to have access to the library APIs.
+*-ltraceevent*
+	Linker switch to add when building a program that uses the library.
+--
+
+SEE ALSO
+--------
+_libtraceevent(3)_, _trace-cmd(1)_, _tep_set_flag(3)_
+
+AUTHOR
+------
+[verse]
+--
+*Steven Rostedt* <rostedt@goodmis.org>, author of *libtraceevent*.
+*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>, author of this man page.
+--
+REPORTING BUGS
+--------------
+Report bugs to  <linux-trace-devel@vger.kernel.org>
+
+LICENSE
+-------
+libtraceevent is Free Software licensed under the GNU LGPL 2.1
+
+RESOURCES
+---------
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
-- 
2.20.1



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

* [PATCH 6/6] tools/lib/traceevent: Move traceevent plugins in its own subdirectory
  2019-09-19 21:23 [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement Steven Rostedt
                   ` (4 preceding siblings ...)
  2019-09-19 21:23 ` [PATCH 5/6] tools/lib/traceevent: Man pages for tep plugins APIs Steven Rostedt
@ 2019-09-19 21:23 ` Steven Rostedt
  2019-09-23 14:28 ` [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement Arnaldo Carvalho de Melo
  6 siblings, 0 replies; 13+ messages in thread
From: Steven Rostedt @ 2019-09-19 21:23 UTC (permalink / raw)
  To: linux-kernel, linux-trace-devel
  Cc: Arnaldo Carvalho de Melo, Ingo Molnar, Jiri Olsa, Namhyung Kim,
	Andrew Morton, Tzvetomir Stoyanov (VMware)

From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>

All traceevent plugins code is moved to tools/lib/traceevent/plugins
subdirectory. It makes traceevent implementation in trace-cmd and in
kernel tree consistent. There is no changes in the way libtraceevent
and plugins are compiled and installed.

Link: http://lore.kernel.org/linux-trace-devel/20190917105055.18983-1-tz.stoyanov@gmail.com

Suggested-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 tools/lib/traceevent/Build                    |  11 -
 tools/lib/traceevent/Makefile                 |  94 ++------
 tools/lib/traceevent/plugins/Build            |  10 +
 tools/lib/traceevent/plugins/Makefile         | 222 ++++++++++++++++++
 .../{ => plugins}/plugin_cfg80211.c           |   0
 .../{ => plugins}/plugin_function.c           |   0
 .../traceevent/{ => plugins}/plugin_hrtimer.c |   0
 .../traceevent/{ => plugins}/plugin_jbd2.c    |   0
 .../traceevent/{ => plugins}/plugin_kmem.c    |   0
 .../lib/traceevent/{ => plugins}/plugin_kvm.c |   0
 .../{ => plugins}/plugin_mac80211.c           |   0
 .../{ => plugins}/plugin_sched_switch.c       |   0
 .../traceevent/{ => plugins}/plugin_scsi.c    |   0
 .../lib/traceevent/{ => plugins}/plugin_xen.c |   0
 14 files changed, 248 insertions(+), 89 deletions(-)
 create mode 100644 tools/lib/traceevent/plugins/Build
 create mode 100644 tools/lib/traceevent/plugins/Makefile
 rename tools/lib/traceevent/{ => plugins}/plugin_cfg80211.c (100%)
 rename tools/lib/traceevent/{ => plugins}/plugin_function.c (100%)
 rename tools/lib/traceevent/{ => plugins}/plugin_hrtimer.c (100%)
 rename tools/lib/traceevent/{ => plugins}/plugin_jbd2.c (100%)
 rename tools/lib/traceevent/{ => plugins}/plugin_kmem.c (100%)
 rename tools/lib/traceevent/{ => plugins}/plugin_kvm.c (100%)
 rename tools/lib/traceevent/{ => plugins}/plugin_mac80211.c (100%)
 rename tools/lib/traceevent/{ => plugins}/plugin_sched_switch.c (100%)
 rename tools/lib/traceevent/{ => plugins}/plugin_scsi.c (100%)
 rename tools/lib/traceevent/{ => plugins}/plugin_xen.c (100%)

diff --git a/tools/lib/traceevent/Build b/tools/lib/traceevent/Build
index ba54bfce0b0b..f9a5d79578f5 100644
--- a/tools/lib/traceevent/Build
+++ b/tools/lib/traceevent/Build
@@ -6,14 +6,3 @@ libtraceevent-y += parse-utils.o
 libtraceevent-y += kbuffer-parse.o
 libtraceevent-y += tep_strerror.o
 libtraceevent-y += event-parse-api.o
-
-plugin_jbd2-y         += plugin_jbd2.o
-plugin_hrtimer-y      += plugin_hrtimer.o
-plugin_kmem-y         += plugin_kmem.o
-plugin_kvm-y          += plugin_kvm.o
-plugin_mac80211-y     += plugin_mac80211.o
-plugin_sched_switch-y += plugin_sched_switch.o
-plugin_function-y     += plugin_function.o
-plugin_xen-y          += plugin_xen.o
-plugin_scsi-y         += plugin_scsi.o
-plugin_cfg80211-y     += plugin_cfg80211.o
diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index a39cdd0d890d..5315f3787f8d 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -58,30 +58,6 @@ export man_dir man_dir_SQ INSTALL
 export DESTDIR DESTDIR_SQ
 export EVENT_PARSE_VERSION
 
-set_plugin_dir := 1
-
-# Set plugin_dir to preffered global plugin location
-# If we install under $HOME directory we go under
-# $(HOME)/.local/lib/traceevent/plugins
-#
-# We dont set PLUGIN_DIR in case we install under $HOME
-# directory, because by default the code looks under:
-# $(HOME)/.local/lib/traceevent/plugins by default.
-#
-ifeq ($(plugin_dir),)
-ifeq ($(prefix),$(HOME))
-override plugin_dir = $(HOME)/.local/lib/traceevent/plugins
-set_plugin_dir := 0
-else
-override plugin_dir = $(libdir)/traceevent/plugins
-endif
-endif
-
-ifeq ($(set_plugin_dir),1)
-PLUGIN_DIR = -DPLUGIN_DIR="$(plugin_dir)"
-PLUGIN_DIR_SQ = '$(subst ','\'',$(PLUGIN_DIR))'
-endif
-
 include ../../scripts/Makefile.include
 
 # copy a bit from Linux kbuild
@@ -105,7 +81,6 @@ export prefix libdir src obj
 # Shell quotes
 libdir_SQ = $(subst ','\'',$(libdir))
 libdir_relative_SQ = $(subst ','\'',$(libdir_relative))
-plugin_dir_SQ = $(subst ','\'',$(plugin_dir))
 
 CONFIG_INCLUDES = 
 CONFIG_LIBS	=
@@ -151,29 +126,14 @@ MAKEOVERRIDES=
 export srctree OUTPUT CC LD CFLAGS V
 build := -f $(srctree)/tools/build/Makefile.build dir=. obj
 
-PLUGINS  = plugin_jbd2.so
-PLUGINS += plugin_hrtimer.so
-PLUGINS += plugin_kmem.so
-PLUGINS += plugin_kvm.so
-PLUGINS += plugin_mac80211.so
-PLUGINS += plugin_sched_switch.so
-PLUGINS += plugin_function.so
-PLUGINS += plugin_xen.so
-PLUGINS += plugin_scsi.so
-PLUGINS += plugin_cfg80211.so
-
-PLUGINS    := $(addprefix $(OUTPUT),$(PLUGINS))
-PLUGINS_IN := $(PLUGINS:.so=-in.o)
-
 TE_IN      := $(OUTPUT)libtraceevent-in.o
 LIB_TARGET := $(addprefix $(OUTPUT),$(LIB_TARGET))
-DYNAMIC_LIST_FILE := $(OUTPUT)libtraceevent-dynamic-list
 
-CMD_TARGETS = $(LIB_TARGET) $(PLUGINS) $(DYNAMIC_LIST_FILE)
+CMD_TARGETS = $(LIB_TARGET)
 
 TARGETS = $(CMD_TARGETS)
 
-all: all_cmd
+all: all_cmd plugins
 
 all_cmd: $(CMD_TARGETS)
 
@@ -188,17 +148,6 @@ $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN)
 $(OUTPUT)libtraceevent.a: $(TE_IN)
 	$(QUIET_LINK)$(RM) $@; $(AR) rcs $@ $^
 
-$(OUTPUT)libtraceevent-dynamic-list: $(PLUGINS)
-	$(QUIET_GEN)$(call do_generate_dynamic_list_file, $(PLUGINS), $@)
-
-plugins: $(PLUGINS)
-
-__plugin_obj = $(notdir $@)
-  plugin_obj = $(__plugin_obj:-in.o=)
-
-$(PLUGINS_IN): force
-	$(Q)$(MAKE) $(build)=$(plugin_obj)
-
 $(OUTPUT)%.so: $(OUTPUT)%-in.o
 	$(QUIET_LINK)$(CC) $(CFLAGS) -shared $(LDFLAGS) -nostartfiles -o $@ $^
 
@@ -258,25 +207,6 @@ define do_install
 	$(INSTALL) $(if $3,-m $3,) $1 '$(DESTDIR_SQ)$2'
 endef
 
-define do_install_plugins
-	for plugin in $1; do				\
-	  $(call do_install,$$plugin,$(plugin_dir_SQ));	\
-	done
-endef
-
-define do_generate_dynamic_list_file
-	symbol_type=`$(NM) -u -D $1 | awk 'NF>1 {print $$1}' | \
-	xargs echo "U w W" | tr 'w ' 'W\n' | sort -u | xargs echo`;\
-	if [ "$$symbol_type" = "U W" ];then				\
-		(echo '{';						\
-		$(NM) -u -D $1 | awk 'NF>1 {print "\t"$$2";"}' | sort -u;\
-		echo '};';						\
-		) > $2;							\
-	else								\
-		(echo Either missing one of [$1] or bad version of $(NM)) 1>&2;\
-	fi
-endef
-
 PKG_CONFIG_FILE = libtraceevent.pc
 define do_install_pkgconfig_file
 	if [ -n "${pkgconfig_dir}" ]; then 					\
@@ -296,10 +226,6 @@ install_lib: all_cmd install_plugins install_headers install_pkgconfig
 		$(call do_install_mkdir,$(libdir_SQ)); \
 		cp -fpR $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ)
 
-install_plugins: $(PLUGINS)
-	$(call QUIET_INSTALL, trace_plugins) \
-		$(call do_install_plugins, $(PLUGINS))
-
 install_pkgconfig:
 	$(call QUIET_INSTALL, $(PKG_CONFIG_FILE)) \
 		$(call do_install_pkgconfig_file,$(prefix))
@@ -313,7 +239,7 @@ install_headers:
 
 install: install_lib
 
-clean:
+clean: clean_plugins
 	$(call QUIET_CLEAN, libtraceevent) \
 		$(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d .*.cmd; \
 		$(RM) TRACEEVENT-CFLAGS tags TAGS; \
@@ -351,7 +277,19 @@ help:
 	@echo '  doc-install         - install the man pages'
 	@echo '  doc-uninstall       - uninstall the man pages'
 	@echo''
-PHONY += force plugins
+
+PHONY += plugins
+plugins:
+	$(call descend,plugins)
+
+PHONY += install_plugins
+install_plugins:
+	$(call descend,plugins,install)
+
+PHONY += clean_plugins
+clean_plugins:
+	$(call descend,plugins,clean)
+
 force:
 
 # Declare the contents of the .PHONY variable as phony.  We keep that
diff --git a/tools/lib/traceevent/plugins/Build b/tools/lib/traceevent/plugins/Build
new file mode 100644
index 000000000000..210d26910613
--- /dev/null
+++ b/tools/lib/traceevent/plugins/Build
@@ -0,0 +1,10 @@
+plugin_jbd2-y         += plugin_jbd2.o
+plugin_hrtimer-y      += plugin_hrtimer.o
+plugin_kmem-y         += plugin_kmem.o
+plugin_kvm-y          += plugin_kvm.o
+plugin_mac80211-y     += plugin_mac80211.o
+plugin_sched_switch-y += plugin_sched_switch.o
+plugin_function-y     += plugin_function.o
+plugin_xen-y          += plugin_xen.o
+plugin_scsi-y         += plugin_scsi.o
+plugin_cfg80211-y     += plugin_cfg80211.o
diff --git a/tools/lib/traceevent/plugins/Makefile b/tools/lib/traceevent/plugins/Makefile
new file mode 100644
index 000000000000..f440989fa55e
--- /dev/null
+++ b/tools/lib/traceevent/plugins/Makefile
@@ -0,0 +1,222 @@
+# SPDX-License-Identifier: GPL-2.0
+
+#MAKEFLAGS += --no-print-directory
+
+
+# Makefiles suck: This macro sets a default value of $(2) for the
+# variable named by $(1), unless the variable has been set by
+# environment or command line. This is necessary for CC and AR
+# because make sets default values, so the simpler ?= approach
+# won't work as expected.
+define allow-override
+  $(if $(or $(findstring environment,$(origin $(1))),\
+            $(findstring command line,$(origin $(1)))),,\
+    $(eval $(1) = $(2)))
+endef
+
+# Allow setting CC and AR, or setting CROSS_COMPILE as a prefix.
+$(call allow-override,CC,$(CROSS_COMPILE)gcc)
+$(call allow-override,AR,$(CROSS_COMPILE)ar)
+$(call allow-override,NM,$(CROSS_COMPILE)nm)
+$(call allow-override,PKG_CONFIG,pkg-config)
+
+EXT = -std=gnu99
+INSTALL = install
+
+# Use DESTDIR for installing into a different root directory.
+# This is useful for building a package. The program will be
+# installed in this directory as if it was the root directory.
+# Then the build tool can move it later.
+DESTDIR ?=
+DESTDIR_SQ = '$(subst ','\'',$(DESTDIR))'
+
+LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
+ifeq ($(LP64), 1)
+  libdir_relative = lib64
+else
+  libdir_relative = lib
+endif
+
+prefix ?= /usr/local
+libdir = $(prefix)/$(libdir_relative)
+
+set_plugin_dir := 1
+
+# Set plugin_dir to preffered global plugin location
+# If we install under $HOME directory we go under
+# $(HOME)/.local/lib/traceevent/plugins
+#
+# We dont set PLUGIN_DIR in case we install under $HOME
+# directory, because by default the code looks under:
+# $(HOME)/.local/lib/traceevent/plugins by default.
+#
+ifeq ($(plugin_dir),)
+ifeq ($(prefix),$(HOME))
+override plugin_dir = $(HOME)/.local/lib/traceevent/plugins
+set_plugin_dir := 0
+else
+override plugin_dir = $(libdir)/traceevent/plugins
+endif
+endif
+
+ifeq ($(set_plugin_dir),1)
+PLUGIN_DIR = -DPLUGIN_DIR="$(plugin_dir)"
+PLUGIN_DIR_SQ = '$(subst ','\'',$(PLUGIN_DIR))'
+endif
+
+include ../../../scripts/Makefile.include
+
+# copy a bit from Linux kbuild
+
+ifeq ("$(origin V)", "command line")
+  VERBOSE = $(V)
+endif
+ifndef VERBOSE
+  VERBOSE = 0
+endif
+
+ifeq ($(srctree),)
+srctree := $(patsubst %/,%,$(dir $(CURDIR)))
+srctree := $(patsubst %/,%,$(dir $(srctree)))
+srctree := $(patsubst %/,%,$(dir $(srctree)))
+srctree := $(patsubst %/,%,$(dir $(srctree)))
+#$(info Determined 'srctree' to be $(srctree))
+endif
+
+export prefix libdir src obj
+
+# Shell quotes
+plugin_dir_SQ = $(subst ','\'',$(plugin_dir))
+
+CONFIG_INCLUDES =
+CONFIG_LIBS    =
+CONFIG_FLAGS   =
+
+OBJ            = $@
+N              =
+
+INCLUDES = -I. -I.. -I $(srctree)/tools/include $(CONFIG_INCLUDES)
+
+# Set compile option CFLAGS
+ifdef EXTRA_CFLAGS
+  CFLAGS := $(EXTRA_CFLAGS)
+else
+  CFLAGS := -g -Wall
+endif
+
+# Append required CFLAGS
+override CFLAGS += -fPIC
+override CFLAGS += $(CONFIG_FLAGS) $(INCLUDES) $(PLUGIN_DIR_SQ)
+override CFLAGS += $(udis86-flags) -D_GNU_SOURCE
+
+ifeq ($(VERBOSE),1)
+  Q =
+else
+  Q = @
+endif
+
+# Disable command line variables (CFLAGS) override from top
+# level Makefile (perf), otherwise build Makefile will get
+# the same command line setup.
+MAKEOVERRIDES=
+
+export srctree OUTPUT CC LD CFLAGS V
+
+build := -f $(srctree)/tools/build/Makefile.build dir=. obj
+
+DYNAMIC_LIST_FILE := $(OUTPUT)libtraceevent-dynamic-list
+
+PLUGINS  = plugin_jbd2.so
+PLUGINS += plugin_hrtimer.so
+PLUGINS += plugin_kmem.so
+PLUGINS += plugin_kvm.so
+PLUGINS += plugin_mac80211.so
+PLUGINS += plugin_sched_switch.so
+PLUGINS += plugin_function.so
+PLUGINS += plugin_xen.so
+PLUGINS += plugin_scsi.so
+PLUGINS += plugin_cfg80211.so
+
+PLUGINS    := $(addprefix $(OUTPUT),$(PLUGINS))
+PLUGINS_IN := $(PLUGINS:.so=-in.o)
+
+plugins: $(PLUGINS) $(DYNAMIC_LIST_FILE)
+
+__plugin_obj = $(notdir $@)
+  plugin_obj = $(__plugin_obj:-in.o=)
+
+$(PLUGINS_IN): force
+	$(Q)$(MAKE) $(build)=$(plugin_obj)
+
+$(OUTPUT)libtraceevent-dynamic-list: $(PLUGINS)
+	$(QUIET_GEN)$(call do_generate_dynamic_list_file, $(PLUGINS), $@)
+
+$(OUTPUT)%.so: $(OUTPUT)%-in.o
+	$(QUIET_LINK)$(CC) $(CFLAGS) -shared $(LDFLAGS) -nostartfiles -o $@ $^
+
+define update_dir
+  (echo $1 > $@.tmp;                           \
+   if [ -r $@ ] && cmp -s $@ $@.tmp; then      \
+     rm -f $@.tmp;                             \
+   else                                                \
+     echo '  UPDATE                 $@';       \
+     mv -f $@.tmp $@;                          \
+   fi);
+endef
+
+tags:	force
+	$(RM) tags
+	find . -name '*.[ch]' | xargs ctags --extra=+f --c-kinds=+px \
+	--regex-c++='/_PE\(([^,)]*).*/TEP_ERRNO__\1/'
+
+TAGS:	force
+	$(RM) TAGS
+	find . -name '*.[ch]' | xargs etags \
+	--regex='/_PE(\([^,)]*\).*/TEP_ERRNO__\1/'
+
+define do_install_mkdir
+	if [ ! -d '$(DESTDIR_SQ)$1' ]; then             \
+		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$1'; \
+	fi
+endef
+
+define do_install
+	$(call do_install_mkdir,$2);                    \
+	$(INSTALL) $(if $3,-m $3,) $1 '$(DESTDIR_SQ)$2'
+endef
+
+define do_install_plugins
+       for plugin in $1; do                            \
+         $(call do_install,$$plugin,$(plugin_dir_SQ)); \
+       done
+endef
+
+define do_generate_dynamic_list_file
+	symbol_type=`$(NM) -u -D $1 | awk 'NF>1 {print $$1}' | \
+	xargs echo "U w W" | tr 'w ' 'W\n' | sort -u | xargs echo`;\
+	if [ "$$symbol_type" = "U W" ];then				\
+		(echo '{';                                              \
+		$(NM) -u -D $1 | awk 'NF>1 {print "\t"$$2";"}' | sort -u;\
+		echo '};';                                              \
+		) > $2;                                                 \
+	else                                                            \
+		(echo Either missing one of [$1] or bad version of $(NM)) 1>&2;\
+		fi
+endef
+
+install: $(PLUGINS)
+	$(call QUIET_INSTALL, trace_plugins) \
+	$(call do_install_plugins, $(PLUGINS))
+
+clean:
+	$(call QUIET_CLEAN, trace_plugins) \
+		$(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d .*.cmd; \
+		$(RM) $(OUTPUT)libtraceevent-dynamic-list \
+		$(RM) TRACEEVENT-CFLAGS tags TAGS;
+
+PHONY += force plugins
+force:
+
+# Declare the contents of the .PHONY variable as phony.  We keep that
+# information in a variable so we can use it in if_changed and friends.
+.PHONY: $(PHONY)
diff --git a/tools/lib/traceevent/plugin_cfg80211.c b/tools/lib/traceevent/plugins/plugin_cfg80211.c
similarity index 100%
rename from tools/lib/traceevent/plugin_cfg80211.c
rename to tools/lib/traceevent/plugins/plugin_cfg80211.c
diff --git a/tools/lib/traceevent/plugin_function.c b/tools/lib/traceevent/plugins/plugin_function.c
similarity index 100%
rename from tools/lib/traceevent/plugin_function.c
rename to tools/lib/traceevent/plugins/plugin_function.c
diff --git a/tools/lib/traceevent/plugin_hrtimer.c b/tools/lib/traceevent/plugins/plugin_hrtimer.c
similarity index 100%
rename from tools/lib/traceevent/plugin_hrtimer.c
rename to tools/lib/traceevent/plugins/plugin_hrtimer.c
diff --git a/tools/lib/traceevent/plugin_jbd2.c b/tools/lib/traceevent/plugins/plugin_jbd2.c
similarity index 100%
rename from tools/lib/traceevent/plugin_jbd2.c
rename to tools/lib/traceevent/plugins/plugin_jbd2.c
diff --git a/tools/lib/traceevent/plugin_kmem.c b/tools/lib/traceevent/plugins/plugin_kmem.c
similarity index 100%
rename from tools/lib/traceevent/plugin_kmem.c
rename to tools/lib/traceevent/plugins/plugin_kmem.c
diff --git a/tools/lib/traceevent/plugin_kvm.c b/tools/lib/traceevent/plugins/plugin_kvm.c
similarity index 100%
rename from tools/lib/traceevent/plugin_kvm.c
rename to tools/lib/traceevent/plugins/plugin_kvm.c
diff --git a/tools/lib/traceevent/plugin_mac80211.c b/tools/lib/traceevent/plugins/plugin_mac80211.c
similarity index 100%
rename from tools/lib/traceevent/plugin_mac80211.c
rename to tools/lib/traceevent/plugins/plugin_mac80211.c
diff --git a/tools/lib/traceevent/plugin_sched_switch.c b/tools/lib/traceevent/plugins/plugin_sched_switch.c
similarity index 100%
rename from tools/lib/traceevent/plugin_sched_switch.c
rename to tools/lib/traceevent/plugins/plugin_sched_switch.c
diff --git a/tools/lib/traceevent/plugin_scsi.c b/tools/lib/traceevent/plugins/plugin_scsi.c
similarity index 100%
rename from tools/lib/traceevent/plugin_scsi.c
rename to tools/lib/traceevent/plugins/plugin_scsi.c
diff --git a/tools/lib/traceevent/plugin_xen.c b/tools/lib/traceevent/plugins/plugin_xen.c
similarity index 100%
rename from tools/lib/traceevent/plugin_xen.c
rename to tools/lib/traceevent/plugins/plugin_xen.c
-- 
2.20.1



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

* Re: [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement
  2019-09-19 21:23 [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement Steven Rostedt
                   ` (5 preceding siblings ...)
  2019-09-19 21:23 ` [PATCH 6/6] tools/lib/traceevent: Move traceevent plugins in its own subdirectory Steven Rostedt
@ 2019-09-23 14:28 ` Arnaldo Carvalho de Melo
  2019-09-23 14:39   ` Arnaldo Carvalho de Melo
  6 siblings, 1 reply; 13+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-09-23 14:28 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, linux-trace-devel, Ingo Molnar, Jiri Olsa,
	Namhyung Kim, Andrew Morton

Em Thu, Sep 19, 2019 at 05:23:35PM -0400, Steven Rostedt escreveu:
> Hi Arnaldo,
> 
> This is a series of man page updates to the libtraceevent code, as
> well as a fix to one missing prototype and some movement of the location
> of the plugins (to have the plugins in their own directory).

Thanks, applied.

- Arnaldo
 
> -- Steve
> 
> 
> 
> 
> Tzvetomir Stoyanov (2):
>       tools/lib/traceevent: Man pages for libtraceevent event print related API
>       tools/lib/traceevent: Man pages for tep plugins APIs
> 
> Tzvetomir Stoyanov (VMware) (4):
>       tools/lib/traceevent: Man pages fix, rename tep_ref_get() to tep_get_ref()
>       tools/lib/traceevent: Man pages fix, changes in event printing APIs
>       tools/lib/traceevent: Add tep_get_event() in event-parse.h
>       tools/lib/traceevent: Move traceevent plugins in its own subdirectory
> 
> ----
>  tools/lib/traceevent/Build                         |  11 -
>  .../Documentation/libtraceevent-event_print.txt    | 130 ++++++++++++
>  .../Documentation/libtraceevent-handle.txt         |   8 +-
>  .../Documentation/libtraceevent-plugins.txt        |  99 +++++++++
>  .../lib/traceevent/Documentation/libtraceevent.txt |  15 +-
>  tools/lib/traceevent/Makefile                      |  94 ++-------
>  tools/lib/traceevent/event-parse.h                 |   2 +
>  tools/lib/traceevent/plugins/Build                 |  10 +
>  tools/lib/traceevent/plugins/Makefile              | 222 +++++++++++++++++++++
>  .../lib/traceevent/{ => plugins}/plugin_cfg80211.c |   0
>  .../lib/traceevent/{ => plugins}/plugin_function.c |   0
>  .../lib/traceevent/{ => plugins}/plugin_hrtimer.c  |   0
>  tools/lib/traceevent/{ => plugins}/plugin_jbd2.c   |   0
>  tools/lib/traceevent/{ => plugins}/plugin_kmem.c   |   0
>  tools/lib/traceevent/{ => plugins}/plugin_kvm.c    |   0
>  .../lib/traceevent/{ => plugins}/plugin_mac80211.c |   0
>  .../traceevent/{ => plugins}/plugin_sched_switch.c |   0
>  tools/lib/traceevent/{ => plugins}/plugin_scsi.c   |   0
>  tools/lib/traceevent/{ => plugins}/plugin_xen.c    |   0
>  19 files changed, 485 insertions(+), 106 deletions(-)
>  create mode 100644 tools/lib/traceevent/Documentation/libtraceevent-event_print.txt
>  create mode 100644 tools/lib/traceevent/Documentation/libtraceevent-plugins.txt
>  create mode 100644 tools/lib/traceevent/plugins/Build
>  create mode 100644 tools/lib/traceevent/plugins/Makefile
>  rename tools/lib/traceevent/{ => plugins}/plugin_cfg80211.c (100%)
>  rename tools/lib/traceevent/{ => plugins}/plugin_function.c (100%)
>  rename tools/lib/traceevent/{ => plugins}/plugin_hrtimer.c (100%)
>  rename tools/lib/traceevent/{ => plugins}/plugin_jbd2.c (100%)
>  rename tools/lib/traceevent/{ => plugins}/plugin_kmem.c (100%)
>  rename tools/lib/traceevent/{ => plugins}/plugin_kvm.c (100%)
>  rename tools/lib/traceevent/{ => plugins}/plugin_mac80211.c (100%)
>  rename tools/lib/traceevent/{ => plugins}/plugin_sched_switch.c (100%)
>  rename tools/lib/traceevent/{ => plugins}/plugin_scsi.c (100%)
>  rename tools/lib/traceevent/{ => plugins}/plugin_xen.c (100%)

-- 

- Arnaldo

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

* Re: [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement
  2019-09-23 14:28 ` [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement Arnaldo Carvalho de Melo
@ 2019-09-23 14:39   ` Arnaldo Carvalho de Melo
  2019-09-23 14:52     ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 13+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-09-23 14:39 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, linux-trace-devel, Ingo Molnar, Jiri Olsa,
	Namhyung Kim, Andrew Morton

Em Mon, Sep 23, 2019 at 11:28:39AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Thu, Sep 19, 2019 at 05:23:35PM -0400, Steven Rostedt escreveu:
> > Hi Arnaldo,
> > 
> > This is a series of man page updates to the libtraceevent code, as
> > well as a fix to one missing prototype and some movement of the location
> > of the plugins (to have the plugins in their own directory).
 
> Thanks, applied.

Its breaking the build on Ubuntu 19.04 cross building to aarch64, I'll
see if I can fix it:

perfbuilder@9660e1237188:~$ m
make: Entering directory '/git/perf/tools/perf'
  BUILD:   Doing 'make -j8' parallel build
sh: 1: command: Illegal option -c

Auto-detecting system features:
...                         dwarf: [ on  ]
...            dwarf_getlocations: [ on  ]
...                         glibc: [ on  ]
...                          gtk2: [ OFF ]
...                      libaudit: [ OFF ]
...                        libbfd: [ OFF ]
...                        libcap: [ OFF ]
...                        libelf: [ on  ]
...                       libnuma: [ OFF ]
...        numa_num_possible_cpus: [ OFF ]
...                       libperl: [ OFF ]
...                     libpython: [ OFF ]
...                     libcrypto: [ OFF ]
...                     libunwind: [ OFF ]
...            libdw-dwarf-unwind: [ on  ]
...                          zlib: [ on  ]
...                          lzma: [ OFF ]
...                     get_cpuid: [ OFF ]
...                           bpf: [ on  ]
...                        libaio: [ on  ]
...                       libzstd: [ OFF ]
...        disassembler-four-args: [ OFF ]

Makefile.config:497: No sys/sdt.h found, no SDT events are defined, please install systemtap-sdt-devel or systemtap-sdt-dev
Makefile.config:545: No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR
Makefile.config:637: No libcrypto.h found, disables jitted code injection, please install openssl-devel or libssl-dev
Makefile.config:653: slang not found, disables TUI support. Please install slang-devel, libslang-dev or libslang2-dev
Makefile.config:670: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev
Makefile.config:697: Missing perl devel files. Disabling perl scripting support, please install perl-ExtUtils-Embed/libperl-dev
Makefile.config:724: No python interpreter was found: disables Python support - please install python-devel/python-dev
Makefile.config:782: No bfd.h/libbfd found, please install binutils-dev[el]/zlib-static/libiberty-dev to gain symbol demangling
Makefile.config:813: No liblzma found, disables xz kernel module decompression, please install xz-devel/liblzma-dev
Makefile.config:826: No libzstd found, disables trace compression, please install libzstd-dev[el] and/or set LIBZSTD_DIR
Makefile.config:837: No libcap found, disables capability support, please install libcap-devel/libcap-dev
Makefile.config:850: No numa.h found, disables 'perf bench numa mem' benchmark, please install numactl-devel/libnuma-devel/libnuma-dev
Makefile.config:905: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev
Makefile.config:931: No alternatives command found, you need to set JDIR= to point to the root of your Java directory
  DESCEND  plugins
make[3]: *** No rule to make target '/tmp/build/perf/libtraceevent-dynamic-list'.  Stop.
make[2]: *** [Makefile.perf:740: /tmp/build/perf/libtraceevent-dynamic-list] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile.perf:221: sub-make] Error 2
make: *** [Makefile:70: all] Error 2
make: Leaving directory '/git/perf/tools/perf'
perfbuilder@9660e1237188:~$ export
declare -x ARCH="arm64"
declare -x CROSS_COMPILE="aarch64-linux-gnu-"
declare -x EXTRA_MAKE_ARGS="CORESIGHT=1"
declare -x HOME="/home/perfbuilder"
declare -x HOSTNAME="9660e1237188"
declare -x OLDPWD="/"
declare -x PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
declare -x PWD="/home/perfbuilder"
declare -x SHLVL="1"
declare -x TARGET="aarch64-linux-gnu"
declare -x TERM="xterm"
declare -x container="podman"
perfbuilder@9660e1237188:~$



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

* Re: [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement
  2019-09-23 14:39   ` Arnaldo Carvalho de Melo
@ 2019-09-23 14:52     ` Arnaldo Carvalho de Melo
  2019-09-23 15:12       ` Steven Rostedt
  0 siblings, 1 reply; 13+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-09-23 14:52 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, linux-trace-devel, Ingo Molnar, Jiri Olsa,
	Namhyung Kim, Andrew Morton

Em Mon, Sep 23, 2019 at 11:39:27AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Mon, Sep 23, 2019 at 11:28:39AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Thu, Sep 19, 2019 at 05:23:35PM -0400, Steven Rostedt escreveu:
> > > Hi Arnaldo,
> > > 
> > > This is a series of man page updates to the libtraceevent code, as
> > > well as a fix to one missing prototype and some movement of the location
> > > of the plugins (to have the plugins in their own directory).
>  
> > Thanks, applied.
> 
> Its breaking the build on Ubuntu 19.04 cross building to aarch64, I'll
> see if I can fix it:

Makefiles really suck, so I'm removing this one till we get this sorted
out:

"Move traceevent plugins in its own subdirectory"

Ok?

- Arnaldo
 
> perfbuilder@9660e1237188:~$ m
> make: Entering directory '/git/perf/tools/perf'
>   BUILD:   Doing 'make -j8' parallel build
> sh: 1: command: Illegal option -c
> 
> Auto-detecting system features:
> ...                         dwarf: [ on  ]
> ...            dwarf_getlocations: [ on  ]
> ...                         glibc: [ on  ]
> ...                          gtk2: [ OFF ]
> ...                      libaudit: [ OFF ]
> ...                        libbfd: [ OFF ]
> ...                        libcap: [ OFF ]
> ...                        libelf: [ on  ]
> ...                       libnuma: [ OFF ]
> ...        numa_num_possible_cpus: [ OFF ]
> ...                       libperl: [ OFF ]
> ...                     libpython: [ OFF ]
> ...                     libcrypto: [ OFF ]
> ...                     libunwind: [ OFF ]
> ...            libdw-dwarf-unwind: [ on  ]
> ...                          zlib: [ on  ]
> ...                          lzma: [ OFF ]
> ...                     get_cpuid: [ OFF ]
> ...                           bpf: [ on  ]
> ...                        libaio: [ on  ]
> ...                       libzstd: [ OFF ]
> ...        disassembler-four-args: [ OFF ]
> 
> Makefile.config:497: No sys/sdt.h found, no SDT events are defined, please install systemtap-sdt-devel or systemtap-sdt-dev
> Makefile.config:545: No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR
> Makefile.config:637: No libcrypto.h found, disables jitted code injection, please install openssl-devel or libssl-dev
> Makefile.config:653: slang not found, disables TUI support. Please install slang-devel, libslang-dev or libslang2-dev
> Makefile.config:670: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev
> Makefile.config:697: Missing perl devel files. Disabling perl scripting support, please install perl-ExtUtils-Embed/libperl-dev
> Makefile.config:724: No python interpreter was found: disables Python support - please install python-devel/python-dev
> Makefile.config:782: No bfd.h/libbfd found, please install binutils-dev[el]/zlib-static/libiberty-dev to gain symbol demangling
> Makefile.config:813: No liblzma found, disables xz kernel module decompression, please install xz-devel/liblzma-dev
> Makefile.config:826: No libzstd found, disables trace compression, please install libzstd-dev[el] and/or set LIBZSTD_DIR
> Makefile.config:837: No libcap found, disables capability support, please install libcap-devel/libcap-dev
> Makefile.config:850: No numa.h found, disables 'perf bench numa mem' benchmark, please install numactl-devel/libnuma-devel/libnuma-dev
> Makefile.config:905: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev
> Makefile.config:931: No alternatives command found, you need to set JDIR= to point to the root of your Java directory
>   DESCEND  plugins
> make[3]: *** No rule to make target '/tmp/build/perf/libtraceevent-dynamic-list'.  Stop.
> make[2]: *** [Makefile.perf:740: /tmp/build/perf/libtraceevent-dynamic-list] Error 2
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [Makefile.perf:221: sub-make] Error 2
> make: *** [Makefile:70: all] Error 2
> make: Leaving directory '/git/perf/tools/perf'
> perfbuilder@9660e1237188:~$ export
> declare -x ARCH="arm64"
> declare -x CROSS_COMPILE="aarch64-linux-gnu-"
> declare -x EXTRA_MAKE_ARGS="CORESIGHT=1"
> declare -x HOME="/home/perfbuilder"
> declare -x HOSTNAME="9660e1237188"
> declare -x OLDPWD="/"
> declare -x PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
> declare -x PWD="/home/perfbuilder"
> declare -x SHLVL="1"
> declare -x TARGET="aarch64-linux-gnu"
> declare -x TERM="xterm"
> declare -x container="podman"
> perfbuilder@9660e1237188:~$
> 
> 

-- 

- Arnaldo

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

* Re: [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement
  2019-09-23 14:52     ` Arnaldo Carvalho de Melo
@ 2019-09-23 15:12       ` Steven Rostedt
  2019-09-23 15:59         ` Steven Rostedt
  0 siblings, 1 reply; 13+ messages in thread
From: Steven Rostedt @ 2019-09-23 15:12 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, linux-trace-devel, Ingo Molnar, Jiri Olsa,
	Namhyung Kim, Andrew Morton

On Mon, 23 Sep 2019 11:52:49 -0300
Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:

> Em Mon, Sep 23, 2019 at 11:39:27AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Mon, Sep 23, 2019 at 11:28:39AM -0300, Arnaldo Carvalho de Melo escreveu:  
> > > Em Thu, Sep 19, 2019 at 05:23:35PM -0400, Steven Rostedt escreveu:  
> > > > Hi Arnaldo,
> > > > 
> > > > This is a series of man page updates to the libtraceevent code, as
> > > > well as a fix to one missing prototype and some movement of the location
> > > > of the plugins (to have the plugins in their own directory).  
> >    
> > > Thanks, applied.  
> > 
> > Its breaking the build on Ubuntu 19.04 cross building to aarch64, I'll
> > see if I can fix it:  
> 
> Makefiles really suck, so I'm removing this one till we get this sorted
> out:
> 
> "Move traceevent plugins in its own subdirectory"
> 
> Ok?

Yeah. Let's not apply this one yet till we figure out what broke. I'll
take a look at it too.

Thanks!

-- Steve

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

* Re: [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement
  2019-09-23 15:12       ` Steven Rostedt
@ 2019-09-23 15:59         ` Steven Rostedt
  2019-09-23 17:38           ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 13+ messages in thread
From: Steven Rostedt @ 2019-09-23 15:59 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, linux-trace-devel, Ingo Molnar, Jiri Olsa,
	Namhyung Kim, Andrew Morton

On Mon, 23 Sep 2019 11:12:48 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> Yeah. Let's not apply this one yet till we figure out what broke. I'll
> take a look at it too.

Does this help?

-- Steve

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index f9807d8c005b..7544166dd466 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -292,7 +292,7 @@ endif
 LIBTRACEEVENT = $(TE_PATH)libtraceevent.a
 export LIBTRACEEVENT
 
-LIBTRACEEVENT_DYNAMIC_LIST = $(TE_PATH)libtraceevent-dynamic-list
+LIBTRACEEVENT_DYNAMIC_LIST = $(TE_PATH)plugins/libtraceevent-dynamic-list
 
 #
 # The static build has no dynsym table, so this does not work for
@@ -737,7 +737,7 @@ libtraceevent_plugins: FORCE
 	$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) plugins
 
 $(LIBTRACEEVENT_DYNAMIC_LIST): libtraceevent_plugins
-	$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent-dynamic-list
+	$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)plugins/libtraceevent-dynamic-list
 
 $(LIBTRACEEVENT)-clean:
 	$(call QUIET_CLEAN, libtraceevent)


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

* Re: [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement
  2019-09-23 15:59         ` Steven Rostedt
@ 2019-09-23 17:38           ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 13+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-09-23 17:38 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Arnaldo Carvalho de Melo, linux-kernel, linux-trace-devel,
	Ingo Molnar, Jiri Olsa, Namhyung Kim, Andrew Morton

Em Mon, Sep 23, 2019 at 11:59:29AM -0400, Steven Rostedt escreveu:
> On Mon, 23 Sep 2019 11:12:48 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> > Yeah. Let's not apply this one yet till we figure out what broke. I'll
> > take a look at it too.
> 
> Does this help?

yeap, did the trick, I'm folding this one with the faulty one, thanks
for the prompt reply.

- Arnaldo
 
> -- Steve
> 
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index f9807d8c005b..7544166dd466 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -292,7 +292,7 @@ endif
>  LIBTRACEEVENT = $(TE_PATH)libtraceevent.a
>  export LIBTRACEEVENT
>  
> -LIBTRACEEVENT_DYNAMIC_LIST = $(TE_PATH)libtraceevent-dynamic-list
> +LIBTRACEEVENT_DYNAMIC_LIST = $(TE_PATH)plugins/libtraceevent-dynamic-list
>  
>  #
>  # The static build has no dynsym table, so this does not work for
> @@ -737,7 +737,7 @@ libtraceevent_plugins: FORCE
>  	$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) plugins
>  
>  $(LIBTRACEEVENT_DYNAMIC_LIST): libtraceevent_plugins
> -	$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent-dynamic-list
> +	$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)plugins/libtraceevent-dynamic-list
>  
>  $(LIBTRACEEVENT)-clean:
>  	$(call QUIET_CLEAN, libtraceevent)

-- 

- Arnaldo

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

end of thread, back to index

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-19 21:23 [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement Steven Rostedt
2019-09-19 21:23 ` [PATCH 1/6] tools/lib/traceevent: Man pages for libtraceevent event print related API Steven Rostedt
2019-09-19 21:23 ` [PATCH 2/6] tools/lib/traceevent: Man pages fix, rename tep_ref_get() to tep_get_ref() Steven Rostedt
2019-09-19 21:23 ` [PATCH 3/6] tools/lib/traceevent: Man pages fix, changes in event printing APIs Steven Rostedt
2019-09-19 21:23 ` [PATCH 4/6] tools/lib/traceevent: Add tep_get_event() in event-parse.h Steven Rostedt
2019-09-19 21:23 ` [PATCH 5/6] tools/lib/traceevent: Man pages for tep plugins APIs Steven Rostedt
2019-09-19 21:23 ` [PATCH 6/6] tools/lib/traceevent: Move traceevent plugins in its own subdirectory Steven Rostedt
2019-09-23 14:28 ` [PATCH 0/6] tools/lib/traceevent: Man page updates and some file movement Arnaldo Carvalho de Melo
2019-09-23 14:39   ` Arnaldo Carvalho de Melo
2019-09-23 14:52     ` Arnaldo Carvalho de Melo
2019-09-23 15:12       ` Steven Rostedt
2019-09-23 15:59         ` Steven Rostedt
2019-09-23 17:38           ` Arnaldo Carvalho de Melo

Linux-Trace-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-trace-devel/0 linux-trace-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-trace-devel linux-trace-devel/ https://lore.kernel.org/linux-trace-devel \
		linux-trace-devel@vger.kernel.org
	public-inbox-index linux-trace-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-trace-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git