All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/5] build/libtraceevent resends
@ 2022-12-13 23:26 Ian Rogers
  2022-12-13 23:26 ` [PATCH v1 1/5] perf build: Fix python/perf.so library's name Ian Rogers
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Ian Rogers @ 2022-12-13 23:26 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Alexey Bayduraev, Adrian Hunter, Anshuman Khandual, Andi Kleen,
	James Clark, Sandipan Das, German Gomez, Leo Yan, Timothy Hayes,
	Kan Liang, Xing Zhengjun, Kim Phillips, Riccardo Mancini,
	Sean Christopherson, shaomin Deng, Eelco Chaudron, Athira Jajeev,
	linux-kernel, linux-perf-users, bpf
  Cc: Stephane Eranian, Ian Rogers

All patches on the acme perf/core branch.

Resend incremental build fix python plugin:
https://lore.kernel.org/lkml/20221205225940.3079667-4-irogers@google.com/

Break apart and resend libtraceevent debug logging support:
https://lore.kernel.org/linux-perf-users/20210923001024.550263-4-irogers@google.com/

Switch "#if HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE" to "#if
MAKE_LIBTRACEEVENT_VERSION(1, 5, 0) <= LIBTRACEEVENT_VERSION",
ensuring trace-event.h is included as discussed on the mailing list.

Resend removal of --group option:
https://lore.kernel.org/lkml/20220707195610.303254-1-irogers@google.com/

Ian Rogers (5):
  perf build: Fix python/perf.so library's name
  perf trace-event: Add libtraceevent version tools to header
  libtraceevent: Increase libtraceevent logging when verbose
  perf trace-event: Use version check to avoid 1 define
  perf evlist: Remove group option.

 tools/perf/Documentation/perf-record.txt      |  4 ----
 tools/perf/Documentation/perf-top.txt         |  7 ++----
 tools/perf/Makefile.config                    |  8 +++----
 tools/perf/Makefile.perf                      |  2 +-
 tools/perf/builtin-record.c                   |  2 --
 tools/perf/builtin-stat.c                     |  6 -----
 tools/perf/builtin-top.c                      |  2 --
 tools/perf/builtin-trace.c                    |  2 +-
 tools/perf/tests/attr/README                  |  2 --
 tools/perf/tests/attr/test-record-group       | 22 -------------------
 tools/perf/tests/attr/test-stat-group         | 17 --------------
 tools/perf/util/data-convert-bt.c             |  3 ++-
 tools/perf/util/debug.c                       | 10 +++++++++
 tools/perf/util/evlist.c                      |  2 +-
 tools/perf/util/evlist.h                      |  2 --
 tools/perf/util/evsel.c                       |  2 +-
 tools/perf/util/python.c                      | 10 +--------
 tools/perf/util/record.c                      |  7 ------
 tools/perf/util/record.h                      |  1 -
 .../util/scripting-engines/trace-event-perl.c |  2 +-
 .../scripting-engines/trace-event-python.c    |  2 +-
 tools/perf/util/sort.c                        |  3 ++-
 tools/perf/util/trace-event.h                 | 13 +++++++++++
 23 files changed, 39 insertions(+), 92 deletions(-)
 delete mode 100644 tools/perf/tests/attr/test-record-group
 delete mode 100644 tools/perf/tests/attr/test-stat-group

-- 
2.39.0.314.g84b9a713c41-goog


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

* [PATCH v1 1/5] perf build: Fix python/perf.so library's name
  2022-12-13 23:26 [PATCH v1 0/5] build/libtraceevent resends Ian Rogers
@ 2022-12-13 23:26 ` Ian Rogers
  2022-12-13 23:26 ` [PATCH v1 2/5] perf trace-event: Add libtraceevent version tools to header Ian Rogers
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Ian Rogers @ 2022-12-13 23:26 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Alexey Bayduraev, Adrian Hunter, Anshuman Khandual, Andi Kleen,
	James Clark, Sandipan Das, German Gomez, Leo Yan, Timothy Hayes,
	Kan Liang, Xing Zhengjun, Kim Phillips, Riccardo Mancini,
	Sean Christopherson, shaomin Deng, Eelco Chaudron, Athira Jajeev,
	linux-kernel, linux-perf-users, bpf
  Cc: Stephane Eranian, Ian Rogers

Since Python 3.3 extensions have a suffix encoding platform and
version information. For example, the perf extension was previously
perf.so but now maybe perf.cpython-310-x86_64-linux-gnu.so. Compute
the extension using Python and then use this in the target name. Doing
this avoids the "perf.so" target always being rebuilt.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/Makefile.config | 4 +++-
 tools/perf/Makefile.perf   | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 52a4dc029111..83ed969b95b4 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -871,6 +871,7 @@ define disable-python_code
   NO_LIBPYTHON := 1
 endef
 
+PYTHON_EXTENSION_SUFFIX := '.so'
 ifdef NO_LIBPYTHON
   $(call disable-python,Python support disabled by user)
 else
@@ -889,7 +890,8 @@ else
       else
          LDFLAGS += $(PYTHON_EMBED_LDFLAGS)
          EXTLIBS += $(PYTHON_EMBED_LIBADD)
-         LANG_BINDINGS += $(obj-perf)python/perf.so
+         PYTHON_EXTENSION_SUFFIX := $(shell $(PYTHON) -c 'from importlib import machinery; print(machinery.EXTENSION_SUFFIXES[0])')
+         LANG_BINDINGS += $(obj-perf)python/perf$(PYTHON_EXTENSION_SUFFIX)
          CFLAGS += -DHAVE_LIBPYTHON_SUPPORT
          $(call detected,CONFIG_LIBPYTHON)
       endif
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 98f629bbd1aa..9b7886ce0674 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -647,7 +647,7 @@ all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS)
 # Create python binding output directory if not already present
 _dummy := $(shell [ -d '$(OUTPUT)python' ] || mkdir -p '$(OUTPUT)python')
 
-$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBPERF)
+$(OUTPUT)python/perf$(PYTHON_EXTENSION_SUFFIX): $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBPERF)
 	$(QUIET_GEN)LDSHARED="$(CC) -pthread -shared" \
         CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' \
 	  $(PYTHON_WORD) util/setup.py \
-- 
2.39.0.314.g84b9a713c41-goog


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

* [PATCH v1 2/5] perf trace-event: Add libtraceevent version tools to header
  2022-12-13 23:26 [PATCH v1 0/5] build/libtraceevent resends Ian Rogers
  2022-12-13 23:26 ` [PATCH v1 1/5] perf build: Fix python/perf.so library's name Ian Rogers
@ 2022-12-13 23:26 ` Ian Rogers
  2022-12-13 23:26 ` [PATCH v1 3/5] libtraceevent: Increase libtraceevent logging when verbose Ian Rogers
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Ian Rogers @ 2022-12-13 23:26 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Alexey Bayduraev, Adrian Hunter, Anshuman Khandual, Andi Kleen,
	James Clark, Sandipan Das, German Gomez, Leo Yan, Timothy Hayes,
	Kan Liang, Xing Zhengjun, Kim Phillips, Riccardo Mancini,
	Sean Christopherson, shaomin Deng, Eelco Chaudron, Athira Jajeev,
	linux-kernel, linux-perf-users, bpf
  Cc: Stephane Eranian, Ian Rogers

Allow comparisons like:
\#if MAKE_LIBTRACEEVENT_VERSION(1, 3, 0) <= LIBTRACEEVENT_VERSION

Based on previously reverted:
https://lore.kernel.org/linux-perf-users/20210923001024.550263-4-irogers@google.com/

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/util/trace-event.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index add6c5d9531c..1fbf4c3f8809 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -6,6 +6,19 @@
 #include <stdio.h>
 #include <linux/types.h>
 
+#ifdef HAVE_LIBTRACEEVENT
+#include <traceevent/event-parse.h>
+#endif
+
+#define MAKE_LIBTRACEEVENT_VERSION(a, b, c) ((a)*255*255+(b)*255+(c))
+#ifndef LIBTRACEEVENT_VERSION
+/*
+ * If LIBTRACEEVENT_VERSION wasn't computed then set to version 1.1.0 that
+ * previously shipped with the Linux kernel tools.
+ */
+#define LIBTRACEEVENT_VERSION MAKE_LIBTRACEEVENT_VERSION(1, 1, 0)
+#endif
+
 struct evlist;
 struct machine;
 struct perf_sample;
-- 
2.39.0.314.g84b9a713c41-goog


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

* [PATCH v1 3/5] libtraceevent: Increase libtraceevent logging when verbose
  2022-12-13 23:26 [PATCH v1 0/5] build/libtraceevent resends Ian Rogers
  2022-12-13 23:26 ` [PATCH v1 1/5] perf build: Fix python/perf.so library's name Ian Rogers
  2022-12-13 23:26 ` [PATCH v1 2/5] perf trace-event: Add libtraceevent version tools to header Ian Rogers
@ 2022-12-13 23:26 ` Ian Rogers
  2022-12-13 23:26 ` [PATCH v1 4/5] perf trace-event: Use version check to avoid 1 define Ian Rogers
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Ian Rogers @ 2022-12-13 23:26 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Alexey Bayduraev, Adrian Hunter, Anshuman Khandual, Andi Kleen,
	James Clark, Sandipan Das, German Gomez, Leo Yan, Timothy Hayes,
	Kan Liang, Xing Zhengjun, Kim Phillips, Riccardo Mancini,
	Sean Christopherson, shaomin Deng, Eelco Chaudron, Athira Jajeev,
	linux-kernel, linux-perf-users, bpf
  Cc: Stephane Eranian, Ian Rogers

libtraceevent has added more levels of debug printout and with changes
like:
https://lore.kernel.org/linux-trace-devel/20210507095022.1079364-3-tz.stoyanov@gmail.com
previously generated output like "registering plugin" is no longer
displayed. This change makes it so that if perf's verbose debug output
is enabled then the debug and info libtraceevent messages can be
displayed.
The code is conditionally enabled based on the libtraceevent version as
discussed in the RFC:
https://lore.kernel.org/lkml/20210610060643.595673-1-irogers@google.com/

Based on previously reverted change:
https://lore.kernel.org/linux-perf-users/20210923001024.550263-4-irogers@google.com/
that was reverted due to -Itools/lib being in CFLAGS meaning the
traceevent headers couldn't be properly used from the system.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/util/debug.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c
index 65e6c22f38e4..cd575460818f 100644
--- a/tools/perf/util/debug.c
+++ b/tools/perf/util/debug.c
@@ -22,6 +22,7 @@
 #include "ui/helpline.h"
 #include "ui/ui.h"
 #include "util/parse-sublevel-options.h"
+#include "util/trace-event.h"
 
 #include <linux/ctype.h>
 
@@ -228,6 +229,15 @@ int perf_debug_option(const char *str)
 	/* Allow only verbose value in range (0, 10), otherwise set 0. */
 	verbose = (verbose < 0) || (verbose > 10) ? 0 : verbose;
 
+#if MAKE_LIBTRACEEVENT_VERSION(1, 3, 0) <= LIBTRACEEVENT_VERSION
+	if (verbose == 1)
+		tep_set_loglevel(TEP_LOG_INFO);
+	else if (verbose == 2)
+		tep_set_loglevel(TEP_LOG_DEBUG);
+	else if (verbose >= 3)
+		tep_set_loglevel(TEP_LOG_ALL);
+#endif
+
 	return 0;
 }
 
-- 
2.39.0.314.g84b9a713c41-goog


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

* [PATCH v1 4/5] perf trace-event: Use version check to avoid 1 define
  2022-12-13 23:26 [PATCH v1 0/5] build/libtraceevent resends Ian Rogers
                   ` (2 preceding siblings ...)
  2022-12-13 23:26 ` [PATCH v1 3/5] libtraceevent: Increase libtraceevent logging when verbose Ian Rogers
@ 2022-12-13 23:26 ` Ian Rogers
  2022-12-13 23:26 ` [PATCH v1 5/5] perf evlist: Remove group option Ian Rogers
  2022-12-14 14:22 ` [PATCH v1 0/5] build/libtraceevent resends Arnaldo Carvalho de Melo
  5 siblings, 0 replies; 9+ messages in thread
From: Ian Rogers @ 2022-12-13 23:26 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Alexey Bayduraev, Adrian Hunter, Anshuman Khandual, Andi Kleen,
	James Clark, Sandipan Das, German Gomez, Leo Yan, Timothy Hayes,
	Kan Liang, Xing Zhengjun, Kim Phillips, Riccardo Mancini,
	Sean Christopherson, shaomin Deng, Eelco Chaudron, Athira Jajeev,
	linux-kernel, linux-perf-users, bpf
  Cc: Stephane Eranian, Ian Rogers

Remove HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE by using a version
check against 1.5.0.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/Makefile.config                             | 4 ----
 tools/perf/builtin-trace.c                             | 2 +-
 tools/perf/util/data-convert-bt.c                      | 3 ++-
 tools/perf/util/evsel.c                                | 2 +-
 tools/perf/util/python.c                               | 2 +-
 tools/perf/util/scripting-engines/trace-event-perl.c   | 2 +-
 tools/perf/util/scripting-engines/trace-event-python.c | 2 +-
 tools/perf/util/sort.c                                 | 3 ++-
 8 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 83ed969b95b4..9a71d8659efc 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -1199,10 +1199,6 @@ ifneq ($(NO_LIBTRACEEVENT),1)
     LIBTRACEEVENT_VERSION_CPP := $(shell expr $(LIBTRACEEVENT_VERSION_1) \* 255 \* 255 + $(LIBTRACEEVENT_VERSION_2) \* 255 + $(LIBTRACEEVENT_VERSION_3))
     CFLAGS += -DLIBTRACEEVENT_VERSION=$(LIBTRACEEVENT_VERSION_CPP)
     $(call detected,CONFIG_LIBTRACEEVENT)
-    LIBTRACEEVENT_VERSION_WITH_TEP_FIELD_IS_RELATIVE := $(shell expr 1 \* 255 \* 255 + 5 \* 255 + 0) # 1.5.0
-    ifeq ($(shell test $(LIBTRACEEVENT_VERSION_CPP) -gt $(LIBTRACEEVENT_VERSION_WITH_TEP_FIELD_IS_RELATIVE); echo $$?),0)
-      CFLAGS += -DHAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE
-    endif
   else
     dummy := $(warning Warning: libtraceevent is missing limiting functionality, please install libtraceevent-dev/libtraceevent-devel)
   endif
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index c9802ab549d7..2c8a213e0bc3 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2729,7 +2729,7 @@ static size_t trace__fprintf_tp_fields(struct trace *trace, struct evsel *evsel,
 				offset = format_field__intval(field, sample, evsel->needs_swap);
 				syscall_arg.len = offset >> 16;
 				offset &= 0xffff;
-#ifdef HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE
+#if MAKE_LIBTRACEEVENT_VERSION(1, 5, 0) <= LIBTRACEEVENT_VERSION
 				if (field->flags & TEP_FIELD_IS_RELATIVE)
 					offset += field->offset + field->size;
 #endif
diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
index b842273458b8..7ec0d13fb470 100644
--- a/tools/perf/util/data-convert-bt.c
+++ b/tools/perf/util/data-convert-bt.c
@@ -36,6 +36,7 @@
 #include "util/sample.h"
 
 #ifdef HAVE_LIBTRACEEVENT
+#include "util/trace-event.h"
 #include <traceevent/event-parse.h>
 #endif
 
@@ -322,7 +323,7 @@ static int add_tracepoint_field_value(struct ctf_writer *cw,
 		offset = tmp_val;
 		len = offset >> 16;
 		offset &= 0xffff;
-#ifdef HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE
+#if MAKE_LIBTRACEEVENT_VERSION(1, 5, 0) <= LIBTRACEEVENT_VERSION
 		if (flags & TEP_FIELD_IS_RELATIVE)
 			offset += fmtf->offset + fmtf->size;
 #endif
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 77b2cf5a214e..6e623d5541e9 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -2784,7 +2784,7 @@ void *evsel__rawptr(struct evsel *evsel, struct perf_sample *sample, const char
 	if (field->flags & TEP_FIELD_IS_DYNAMIC) {
 		offset = *(int *)(sample->raw_data + field->offset);
 		offset &= 0xffff;
-#ifdef HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE
+#if MAKE_LIBTRACEEVENT_VERSION(1, 5, 0) <= LIBTRACEEVENT_VERSION
 		if (field->flags & TEP_FIELD_IS_RELATIVE)
 			offset += field->offset + field->size;
 #endif
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c
index 7320f7f777fe..1d0cf72506a6 100644
--- a/tools/perf/util/python.c
+++ b/tools/perf/util/python.c
@@ -442,7 +442,7 @@ tracepoint_field(struct pyrf_event *pe, struct tep_format_field *field)
 			offset  = val;
 			len     = offset >> 16;
 			offset &= 0xffff;
-#ifdef HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE
+#if MAKE_LIBTRACEEVENT_VERSION(1, 5, 0) <= LIBTRACEEVENT_VERSION
 			if (field->flags & TEP_FIELD_IS_RELATIVE)
 				offset += field->offset + field->size;
 #endif
diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c
index c097b7934fd4..1062629d13c2 100644
--- a/tools/perf/util/scripting-engines/trace-event-perl.c
+++ b/tools/perf/util/scripting-engines/trace-event-perl.c
@@ -393,7 +393,7 @@ static void perl_process_tracepoint(struct perf_sample *sample,
 			if (field->flags & TEP_FIELD_IS_DYNAMIC) {
 				offset = *(int *)(data + field->offset);
 				offset &= 0xffff;
-#ifdef HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE
+#if MAKE_LIBTRACEEVENT_VERSION(1, 5, 0) <= LIBTRACEEVENT_VERSION
 				if (field->flags & TEP_FIELD_IS_RELATIVE)
 					offset += field->offset + field->size;
 #endif
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index e930f5f1f36d..e294a13c399d 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -994,7 +994,7 @@ static void python_process_tracepoint(struct perf_sample *sample,
 				offset  = val;
 				len     = offset >> 16;
 				offset &= 0xffff;
-#ifdef HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE
+#if MAKE_LIBTRACEEVENT_VERSION(1, 5, 0) <= LIBTRACEEVENT_VERSION
 				if (field->flags & TEP_FIELD_IS_RELATIVE)
 					offset += field->offset + field->size;
 #endif
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 0ecc2cb13792..b929cc5eb8cf 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -32,6 +32,7 @@
 #include <linux/string.h>
 
 #ifdef HAVE_LIBTRACEEVENT
+#include "trace-event.h"
 #include <traceevent/event-parse.h>
 #endif
 
@@ -2568,7 +2569,7 @@ static int64_t __sort__hde_cmp(struct perf_hpp_fmt *fmt,
 		tep_read_number_field(field, a->raw_data, &dyn);
 		offset = dyn & 0xffff;
 		size = (dyn >> 16) & 0xffff;
-#ifdef HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE
+#if MAKE_LIBTRACEEVENT_VERSION(1, 5, 0) <= LIBTRACEEVENT_VERSION
 		if (field->flags & TEP_FIELD_IS_RELATIVE)
 			offset += field->offset + field->size;
 #endif
-- 
2.39.0.314.g84b9a713c41-goog


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

* [PATCH v1 5/5] perf evlist: Remove group option.
  2022-12-13 23:26 [PATCH v1 0/5] build/libtraceevent resends Ian Rogers
                   ` (3 preceding siblings ...)
  2022-12-13 23:26 ` [PATCH v1 4/5] perf trace-event: Use version check to avoid 1 define Ian Rogers
@ 2022-12-13 23:26 ` Ian Rogers
  2022-12-14 14:22 ` [PATCH v1 0/5] build/libtraceevent resends Arnaldo Carvalho de Melo
  5 siblings, 0 replies; 9+ messages in thread
From: Ian Rogers @ 2022-12-13 23:26 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Alexey Bayduraev, Adrian Hunter, Anshuman Khandual, Andi Kleen,
	James Clark, Sandipan Das, German Gomez, Leo Yan, Timothy Hayes,
	Kan Liang, Xing Zhengjun, Kim Phillips, Riccardo Mancini,
	Sean Christopherson, shaomin Deng, Eelco Chaudron, Athira Jajeev,
	linux-kernel, linux-perf-users, bpf
  Cc: Stephane Eranian, Ian Rogers

The group option predates grouping events using curly braces added in
commit 89efb029502d ("perf tools: Add support to parse event group syntax")
The --group option was retained for legacy support (in August 2012) but
keeping it adds complexity.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/Documentation/perf-record.txt |  4 ----
 tools/perf/Documentation/perf-top.txt    |  7 ++-----
 tools/perf/builtin-record.c              |  2 --
 tools/perf/builtin-stat.c                |  6 ------
 tools/perf/builtin-top.c                 |  2 --
 tools/perf/tests/attr/README             |  2 --
 tools/perf/tests/attr/test-record-group  | 22 ----------------------
 tools/perf/tests/attr/test-stat-group    | 17 -----------------
 tools/perf/util/evlist.c                 |  2 +-
 tools/perf/util/evlist.h                 |  2 --
 tools/perf/util/python.c                 |  8 --------
 tools/perf/util/record.c                 |  7 -------
 tools/perf/util/record.h                 |  1 -
 13 files changed, 3 insertions(+), 79 deletions(-)
 delete mode 100644 tools/perf/tests/attr/test-record-group
 delete mode 100644 tools/perf/tests/attr/test-stat-group

diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index 5f9fa07b3dde..ff815c2f67e8 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -238,10 +238,6 @@ OPTIONS
 	Also, by adding a comma, the number of mmap pages for AUX
 	area tracing can be specified.
 
---group::
-	Put all events in a single event group.  This precedes the --event
-	option and remains only for backward compatibility.  See --event.
-
 -g::
 	Enables call-graph (stack chain/backtrace) recording for both
 	kernel space and user space.
diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt
index c1fdba26bf53..e534d709cc5a 100644
--- a/tools/perf/Documentation/perf-top.txt
+++ b/tools/perf/Documentation/perf-top.txt
@@ -51,9 +51,6 @@ Default is to monitor all CPUS.
 --count-filter=<count>::
 	Only display functions with more events than this.
 
---group::
-        Put the counters into a counter group.
-
 --group-sort-idx::
 	Sort the output by the event at the index n in group. If n is invalid,
 	sort by the first event. It can support multiple groups with different
@@ -313,10 +310,10 @@ use '-e e1 -e e2 -G foo,foo' or just use '-e e1 -e e2 -G foo'.
 
 		perf top -e cycles,probe:icmp_rcv --switch-on=probe:icmp_rcv
 
-	   Alternatively one can ask for --group and then two overhead columns
+	   Alternatively one can ask for a group and then two overhead columns
            will appear, the first for cycles and the second for the switch-on event.
 
-		perf top --group -e cycles,probe:icmp_rcv --switch-on=probe:icmp_rcv
+		perf top -e '{cycles,probe:icmp_rcv}' --switch-on=probe:icmp_rcv
 
 	This may be interesting to measure a workload only after some initialization
 	phase is over, i.e. insert a perf probe at that point and use the above
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 7e17374f6c1a..8ecffa696ce3 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -3380,8 +3380,6 @@ static struct option __record_options[] = {
 	OPT_CALLBACK(0, "mmap-flush", &record.opts, "number",
 		     "Minimal number of bytes that is extracted from mmap data pages (default: 1)",
 		     record__mmap_flush_parse),
-	OPT_BOOLEAN(0, "group", &record.opts.group,
-		    "put the counters into a counter group"),
 	OPT_CALLBACK_NOOPT('g', NULL, &callchain_param,
 			   NULL, "enables call-graph recording" ,
 			   &record_callchain_opt),
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index d040fbcdcc5a..2808f2aa9a82 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -181,7 +181,6 @@ static bool			topdown_run			= false;
 static bool			smi_cost			= false;
 static bool			smi_reset			= false;
 static int			big_num_opt			=  -1;
-static bool			group				= false;
 static const char		*pre_cmd			= NULL;
 static const char		*post_cmd			= NULL;
 static bool			sync_run			= false;
@@ -781,9 +780,6 @@ static int __run_perf_stat(int argc, const char **argv, int run_idx)
 		child_pid = evsel_list->workload.pid;
 	}
 
-	if (group)
-		evlist__set_leader(evsel_list);
-
 	if (!cpu_map__is_dummy(evsel_list->core.user_requested_cpus)) {
 		if (affinity__setup(&saved_affinity) < 0)
 			return -1;
@@ -1192,8 +1188,6 @@ static struct option stat_options[] = {
 #endif
 	OPT_BOOLEAN('a', "all-cpus", &target.system_wide,
 		    "system-wide collection from all CPUs"),
-	OPT_BOOLEAN('g', "group", &group,
-		    "put the counters into a counter group"),
 	OPT_BOOLEAN(0, "scale", &stat_config.scale,
 		    "Use --no-scale to disable counter scaling for multiplexing"),
 	OPT_INCR('v', "verbose", &verbose,
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index bb5bd241246b..d4b5b02bab73 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1471,8 +1471,6 @@ int cmd_top(int argc, const char **argv)
 			    "dump the symbol table used for profiling"),
 	OPT_INTEGER('f', "count-filter", &top.count_filter,
 		    "only display functions with more events than this"),
-	OPT_BOOLEAN(0, "group", &opts->group,
-			    "put the counters into a counter group"),
 	OPT_BOOLEAN('i', "no-inherit", &opts->no_inherit,
 		    "child tasks do not inherit counters"),
 	OPT_STRING(0, "sym-annotate", &top.sym_filter, "symbol name",
diff --git a/tools/perf/tests/attr/README b/tools/perf/tests/attr/README
index eb3f7d4bb324..4066fec7180a 100644
--- a/tools/perf/tests/attr/README
+++ b/tools/perf/tests/attr/README
@@ -49,7 +49,6 @@ Following tests are defined (with perf commands):
   perf record --call-graph dwarf kill		(test-record-graph-dwarf)
   perf record --call-graph fp kill              (test-record-graph-fp)
   perf record --call-graph fp kill              (test-record-graph-fp-aarch64)
-  perf record --group -e cycles,instructions kill (test-record-group)
   perf record -e '{cycles,instructions}' kill   (test-record-group1)
   perf record -e '{cycles/period=1/,instructions/period=2/}:S' kill (test-record-group2)
   perf record -D kill                           (test-record-no-delay)
@@ -66,6 +65,5 @@ Following tests are defined (with perf commands):
   perf stat -d kill                             (test-stat-detailed-1)
   perf stat -dd kill                            (test-stat-detailed-2)
   perf stat -ddd kill                           (test-stat-detailed-3)
-  perf stat --group -e cycles,instructions kill (test-stat-group)
   perf stat -e '{cycles,instructions}' kill     (test-stat-group1)
   perf stat -i -e cycles kill                   (test-stat-no-inherit)
diff --git a/tools/perf/tests/attr/test-record-group b/tools/perf/tests/attr/test-record-group
deleted file mode 100644
index 6c1cff8aae8b..000000000000
--- a/tools/perf/tests/attr/test-record-group
+++ /dev/null
@@ -1,22 +0,0 @@
-[config]
-command = record
-args    = --no-bpf-event --group -e cycles,instructions kill >/dev/null 2>&1
-ret     = 1
-
-[event-1:base-record]
-fd=1
-group_fd=-1
-sample_type=327
-read_format=4|20
-
-[event-2:base-record]
-fd=2
-group_fd=1
-config=1
-sample_type=327
-read_format=4|20
-mmap=0
-comm=0
-task=0
-enable_on_exec=0
-disabled=0
diff --git a/tools/perf/tests/attr/test-stat-group b/tools/perf/tests/attr/test-stat-group
deleted file mode 100644
index e15d6946e9b3..000000000000
--- a/tools/perf/tests/attr/test-stat-group
+++ /dev/null
@@ -1,17 +0,0 @@
-[config]
-command = stat
-args    = --group -e cycles,instructions kill >/dev/null 2>&1
-ret     = 1
-
-[event-1:base-stat]
-fd=1
-group_fd=-1
-read_format=3|15
-
-[event-2:base-stat]
-fd=2
-group_fd=1
-config=1
-disabled=0
-enable_on_exec=0
-read_format=3|15
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 590d4e77effc..817df2504a1e 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -230,7 +230,7 @@ int __evlist__set_tracepoints_handlers(struct evlist *evlist,
 	return err;
 }
 
-void evlist__set_leader(struct evlist *evlist)
+static void evlist__set_leader(struct evlist *evlist)
 {
 	perf_evlist__set_leader(&evlist->core);
 }
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
index e5b84ead566c..01fa9d592c5a 100644
--- a/tools/perf/util/evlist.h
+++ b/tools/perf/util/evlist.h
@@ -221,8 +221,6 @@ void evlist__set_selected(struct evlist *evlist, struct evsel *evsel);
 int evlist__create_maps(struct evlist *evlist, struct target *target);
 int evlist__apply_filters(struct evlist *evlist, struct evsel **err_evsel);
 
-void evlist__set_leader(struct evlist *evlist);
-
 u64 __evlist__combined_sample_type(struct evlist *evlist);
 u64 evlist__combined_sample_type(struct evlist *evlist);
 u64 evlist__combined_branch_type(struct evlist *evlist);
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c
index 1d0cf72506a6..a19d3983e69a 100644
--- a/tools/perf/util/python.c
+++ b/tools/perf/util/python.c
@@ -1142,14 +1142,6 @@ static PyObject *pyrf_evlist__open(struct pyrf_evlist *pevlist,
 				   PyObject *args, PyObject *kwargs)
 {
 	struct evlist *evlist = &pevlist->evlist;
-	int group = 0;
-	static char *kwlist[] = { "group", NULL };
-
-	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOii", kwlist, &group))
-		return NULL;
-
-	if (group)
-		evlist__set_leader(evlist);
 
 	if (evlist__open(evlist) < 0) {
 		PyErr_SetFromErrno(PyExc_OSError);
diff --git a/tools/perf/util/record.c b/tools/perf/util/record.c
index 7b58f6c7c69d..9eb5c6a08999 100644
--- a/tools/perf/util/record.c
+++ b/tools/perf/util/record.c
@@ -99,13 +99,6 @@ void evlist__config(struct evlist *evlist, struct record_opts *opts, struct call
 	bool use_comm_exec;
 	bool sample_id = opts->sample_id;
 
-	/*
-	 * Set the evsel leader links before we configure attributes,
-	 * since some might depend on this info.
-	 */
-	if (opts->group)
-		evlist__set_leader(evlist);
-
 	if (perf_cpu_map__cpu(evlist->core.user_requested_cpus, 0).cpu < 0)
 		opts->no_inherit = true;
 
diff --git a/tools/perf/util/record.h b/tools/perf/util/record.h
index 4269e916f450..46212bf020cf 100644
--- a/tools/perf/util/record.h
+++ b/tools/perf/util/record.h
@@ -13,7 +13,6 @@ struct option;
 
 struct record_opts {
 	struct target target;
-	bool	      group;
 	bool	      inherit_stat;
 	bool	      no_buffering;
 	bool	      no_inherit;
-- 
2.39.0.314.g84b9a713c41-goog


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

* Re: [PATCH v1 0/5] build/libtraceevent resends
  2022-12-13 23:26 [PATCH v1 0/5] build/libtraceevent resends Ian Rogers
                   ` (4 preceding siblings ...)
  2022-12-13 23:26 ` [PATCH v1 5/5] perf evlist: Remove group option Ian Rogers
@ 2022-12-14 14:22 ` Arnaldo Carvalho de Melo
  2022-12-14 18:00   ` Arnaldo Carvalho de Melo
  5 siblings, 1 reply; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-12-14 14:22 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Alexey Bayduraev, Adrian Hunter,
	Anshuman Khandual, Andi Kleen, James Clark, Sandipan Das,
	German Gomez, Leo Yan, Timothy Hayes, Kan Liang, Xing Zhengjun,
	Kim Phillips, Riccardo Mancini, Sean Christopherson,
	shaomin Deng, Eelco Chaudron, Athira Jajeev, linux-kernel,
	linux-perf-users, bpf, Stephane Eranian

Em Tue, Dec 13, 2022 at 03:26:46PM -0800, Ian Rogers escreveu:
> All patches on the acme perf/core branch.
> 
> Resend incremental build fix python plugin:
> https://lore.kernel.org/lkml/20221205225940.3079667-4-irogers@google.com/
> 
> Break apart and resend libtraceevent debug logging support:
> https://lore.kernel.org/linux-perf-users/20210923001024.550263-4-irogers@google.com/
> 
> Switch "#if HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE" to "#if
> MAKE_LIBTRACEEVENT_VERSION(1, 5, 0) <= LIBTRACEEVENT_VERSION",
> ensuring trace-event.h is included as discussed on the mailing list.
> 
> Resend removal of --group option:
> https://lore.kernel.org/lkml/20220707195610.303254-1-irogers@google.com/

Thanks, applied.

- Arnaldo

 
> Ian Rogers (5):
>   perf build: Fix python/perf.so library's name
>   perf trace-event: Add libtraceevent version tools to header
>   libtraceevent: Increase libtraceevent logging when verbose
>   perf trace-event: Use version check to avoid 1 define
>   perf evlist: Remove group option.
> 
>  tools/perf/Documentation/perf-record.txt      |  4 ----
>  tools/perf/Documentation/perf-top.txt         |  7 ++----
>  tools/perf/Makefile.config                    |  8 +++----
>  tools/perf/Makefile.perf                      |  2 +-
>  tools/perf/builtin-record.c                   |  2 --
>  tools/perf/builtin-stat.c                     |  6 -----
>  tools/perf/builtin-top.c                      |  2 --
>  tools/perf/builtin-trace.c                    |  2 +-
>  tools/perf/tests/attr/README                  |  2 --
>  tools/perf/tests/attr/test-record-group       | 22 -------------------
>  tools/perf/tests/attr/test-stat-group         | 17 --------------
>  tools/perf/util/data-convert-bt.c             |  3 ++-
>  tools/perf/util/debug.c                       | 10 +++++++++
>  tools/perf/util/evlist.c                      |  2 +-
>  tools/perf/util/evlist.h                      |  2 --
>  tools/perf/util/evsel.c                       |  2 +-
>  tools/perf/util/python.c                      | 10 +--------
>  tools/perf/util/record.c                      |  7 ------
>  tools/perf/util/record.h                      |  1 -
>  .../util/scripting-engines/trace-event-perl.c |  2 +-
>  .../scripting-engines/trace-event-python.c    |  2 +-
>  tools/perf/util/sort.c                        |  3 ++-
>  tools/perf/util/trace-event.h                 | 13 +++++++++++
>  23 files changed, 39 insertions(+), 92 deletions(-)
>  delete mode 100644 tools/perf/tests/attr/test-record-group
>  delete mode 100644 tools/perf/tests/attr/test-stat-group
> 
> -- 
> 2.39.0.314.g84b9a713c41-goog

-- 

- Arnaldo

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

* Re: [PATCH v1 0/5] build/libtraceevent resends
  2022-12-14 14:22 ` [PATCH v1 0/5] build/libtraceevent resends Arnaldo Carvalho de Melo
@ 2022-12-14 18:00   ` Arnaldo Carvalho de Melo
  2022-12-14 18:10     ` Ian Rogers
  0 siblings, 1 reply; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-12-14 18:00 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Alexey Bayduraev, Adrian Hunter,
	Anshuman Khandual, Andi Kleen, James Clark, Sandipan Das,
	German Gomez, Leo Yan, Timothy Hayes, Kan Liang, Xing Zhengjun,
	Kim Phillips, Riccardo Mancini, Sean Christopherson,
	shaomin Deng, Eelco Chaudron, Athira Jajeev, linux-kernel,
	linux-perf-users, bpf, Stephane Eranian

Em Wed, Dec 14, 2022 at 11:22:45AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Tue, Dec 13, 2022 at 03:26:46PM -0800, Ian Rogers escreveu:
> > All patches on the acme perf/core branch.
> > 
> > Resend incremental build fix python plugin:
> > https://lore.kernel.org/lkml/20221205225940.3079667-4-irogers@google.com/
> > 
> > Break apart and resend libtraceevent debug logging support:
> > https://lore.kernel.org/linux-perf-users/20210923001024.550263-4-irogers@google.com/
> > 
> > Switch "#if HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE" to "#if
> > MAKE_LIBTRACEEVENT_VERSION(1, 5, 0) <= LIBTRACEEVENT_VERSION",
> > ensuring trace-event.h is included as discussed on the mailing list.
> > 
> > Resend removal of --group option:
> > https://lore.kernel.org/lkml/20220707195610.303254-1-irogers@google.com/
> 
> Thanks, applied.

Building on arm64:

/home/acme/git/perf/tools/perf/util/evsel.c: In function ‘evsel__rawptr’:
/home/acme/git/perf/tools/perf/util/evsel.c:2787:65: error: operator '<=' has no right operand
 2787 | #if MAKE_LIBTRACEEVENT_VERSION(1, 5, 0) <= LIBTRACEEVENT_VERSION
      |                                                                 ^
error: command '/usr/bin/gcc' failed with exit code 1
cp: cannot stat '/tmp/build/perf/python_ext_build/lib/perf*.so': No such file or directory

make[2]: *** [Makefile.perf:651: /tmp/build/perf/python/perf.cpython-310-aarch64-linux-gnu.so] Error 1
make[2]: *** Waiting for unfinished jobs....
  LD      /tmp/build/perf/libbpf/staticobjs/libbpf-in.o

Trying to fix...
 
> - Arnaldo
> 
>  
> > Ian Rogers (5):
> >   perf build: Fix python/perf.so library's name
> >   perf trace-event: Add libtraceevent version tools to header
> >   libtraceevent: Increase libtraceevent logging when verbose
> >   perf trace-event: Use version check to avoid 1 define
> >   perf evlist: Remove group option.
> > 
> >  tools/perf/Documentation/perf-record.txt      |  4 ----
> >  tools/perf/Documentation/perf-top.txt         |  7 ++----
> >  tools/perf/Makefile.config                    |  8 +++----
> >  tools/perf/Makefile.perf                      |  2 +-
> >  tools/perf/builtin-record.c                   |  2 --
> >  tools/perf/builtin-stat.c                     |  6 -----
> >  tools/perf/builtin-top.c                      |  2 --
> >  tools/perf/builtin-trace.c                    |  2 +-
> >  tools/perf/tests/attr/README                  |  2 --
> >  tools/perf/tests/attr/test-record-group       | 22 -------------------
> >  tools/perf/tests/attr/test-stat-group         | 17 --------------
> >  tools/perf/util/data-convert-bt.c             |  3 ++-
> >  tools/perf/util/debug.c                       | 10 +++++++++
> >  tools/perf/util/evlist.c                      |  2 +-
> >  tools/perf/util/evlist.h                      |  2 --
> >  tools/perf/util/evsel.c                       |  2 +-
> >  tools/perf/util/python.c                      | 10 +--------
> >  tools/perf/util/record.c                      |  7 ------
> >  tools/perf/util/record.h                      |  1 -
> >  .../util/scripting-engines/trace-event-perl.c |  2 +-
> >  .../scripting-engines/trace-event-python.c    |  2 +-
> >  tools/perf/util/sort.c                        |  3 ++-
> >  tools/perf/util/trace-event.h                 | 13 +++++++++++
> >  23 files changed, 39 insertions(+), 92 deletions(-)
> >  delete mode 100644 tools/perf/tests/attr/test-record-group
> >  delete mode 100644 tools/perf/tests/attr/test-stat-group
> > 
> > -- 
> > 2.39.0.314.g84b9a713c41-goog
> 
> -- 
> 
> - Arnaldo

-- 

- Arnaldo

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

* Re: [PATCH v1 0/5] build/libtraceevent resends
  2022-12-14 18:00   ` Arnaldo Carvalho de Melo
@ 2022-12-14 18:10     ` Ian Rogers
  0 siblings, 0 replies; 9+ messages in thread
From: Ian Rogers @ 2022-12-14 18:10 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Alexey Bayduraev, Adrian Hunter,
	Anshuman Khandual, Andi Kleen, James Clark, Sandipan Das,
	German Gomez, Leo Yan, Timothy Hayes, Kan Liang, Xing Zhengjun,
	Kim Phillips, Riccardo Mancini, Sean Christopherson,
	shaomin Deng, Eelco Chaudron, Athira Jajeev, linux-kernel,
	linux-perf-users, bpf, Stephane Eranian

On Wed, Dec 14, 2022 at 10:00 AM Arnaldo Carvalho de Melo
<acme@kernel.org> wrote:
>
> Em Wed, Dec 14, 2022 at 11:22:45AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Tue, Dec 13, 2022 at 03:26:46PM -0800, Ian Rogers escreveu:
> > > All patches on the acme perf/core branch.
> > >
> > > Resend incremental build fix python plugin:
> > > https://lore.kernel.org/lkml/20221205225940.3079667-4-irogers@google.com/
> > >
> > > Break apart and resend libtraceevent debug logging support:
> > > https://lore.kernel.org/linux-perf-users/20210923001024.550263-4-irogers@google.com/
> > >
> > > Switch "#if HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE" to "#if
> > > MAKE_LIBTRACEEVENT_VERSION(1, 5, 0) <= LIBTRACEEVENT_VERSION",
> > > ensuring trace-event.h is included as discussed on the mailing list.
> > >
> > > Resend removal of --group option:
> > > https://lore.kernel.org/lkml/20220707195610.303254-1-irogers@google.com/
> >
> > Thanks, applied.
>
> Building on arm64:
>
> /home/acme/git/perf/tools/perf/util/evsel.c: In function ‘evsel__rawptr’:
> /home/acme/git/perf/tools/perf/util/evsel.c:2787:65: error: operator '<=' has no right operand
>  2787 | #if MAKE_LIBTRACEEVENT_VERSION(1, 5, 0) <= LIBTRACEEVENT_VERSION
>       |                                                                 ^
> error: command '/usr/bin/gcc' failed with exit code 1
> cp: cannot stat '/tmp/build/perf/python_ext_build/lib/perf*.so': No such file or directory
>
> make[2]: *** [Makefile.perf:651: /tmp/build/perf/python/perf.cpython-310-aarch64-linux-gnu.so] Error 1
> make[2]: *** Waiting for unfinished jobs....
>   LD      /tmp/build/perf/libbpf/staticobjs/libbpf-in.o
>
> Trying to fix...

Thanks, I suspect the CFLAGS aren't passed through maybe, given this
is the python code. Perhaps an include of util/trace-event.h is also
necessary, but I thought that was already present:
https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tree/tools/perf/util/evsel.c?h=perf/core#n43

Thanks for digging into it,
Ian

> > - Arnaldo
> >
> >
> > > Ian Rogers (5):
> > >   perf build: Fix python/perf.so library's name
> > >   perf trace-event: Add libtraceevent version tools to header
> > >   libtraceevent: Increase libtraceevent logging when verbose
> > >   perf trace-event: Use version check to avoid 1 define
> > >   perf evlist: Remove group option.
> > >
> > >  tools/perf/Documentation/perf-record.txt      |  4 ----
> > >  tools/perf/Documentation/perf-top.txt         |  7 ++----
> > >  tools/perf/Makefile.config                    |  8 +++----
> > >  tools/perf/Makefile.perf                      |  2 +-
> > >  tools/perf/builtin-record.c                   |  2 --
> > >  tools/perf/builtin-stat.c                     |  6 -----
> > >  tools/perf/builtin-top.c                      |  2 --
> > >  tools/perf/builtin-trace.c                    |  2 +-
> > >  tools/perf/tests/attr/README                  |  2 --
> > >  tools/perf/tests/attr/test-record-group       | 22 -------------------
> > >  tools/perf/tests/attr/test-stat-group         | 17 --------------
> > >  tools/perf/util/data-convert-bt.c             |  3 ++-
> > >  tools/perf/util/debug.c                       | 10 +++++++++
> > >  tools/perf/util/evlist.c                      |  2 +-
> > >  tools/perf/util/evlist.h                      |  2 --
> > >  tools/perf/util/evsel.c                       |  2 +-
> > >  tools/perf/util/python.c                      | 10 +--------
> > >  tools/perf/util/record.c                      |  7 ------
> > >  tools/perf/util/record.h                      |  1 -
> > >  .../util/scripting-engines/trace-event-perl.c |  2 +-
> > >  .../scripting-engines/trace-event-python.c    |  2 +-
> > >  tools/perf/util/sort.c                        |  3 ++-
> > >  tools/perf/util/trace-event.h                 | 13 +++++++++++
> > >  23 files changed, 39 insertions(+), 92 deletions(-)
> > >  delete mode 100644 tools/perf/tests/attr/test-record-group
> > >  delete mode 100644 tools/perf/tests/attr/test-stat-group
> > >
> > > --
> > > 2.39.0.314.g84b9a713c41-goog
> >
> > --
> >
> > - Arnaldo
>
> --
>
> - Arnaldo

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

end of thread, other threads:[~2022-12-14 18:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-13 23:26 [PATCH v1 0/5] build/libtraceevent resends Ian Rogers
2022-12-13 23:26 ` [PATCH v1 1/5] perf build: Fix python/perf.so library's name Ian Rogers
2022-12-13 23:26 ` [PATCH v1 2/5] perf trace-event: Add libtraceevent version tools to header Ian Rogers
2022-12-13 23:26 ` [PATCH v1 3/5] libtraceevent: Increase libtraceevent logging when verbose Ian Rogers
2022-12-13 23:26 ` [PATCH v1 4/5] perf trace-event: Use version check to avoid 1 define Ian Rogers
2022-12-13 23:26 ` [PATCH v1 5/5] perf evlist: Remove group option Ian Rogers
2022-12-14 14:22 ` [PATCH v1 0/5] build/libtraceevent resends Arnaldo Carvalho de Melo
2022-12-14 18:00   ` Arnaldo Carvalho de Melo
2022-12-14 18:10     ` Ian Rogers

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.