Re: [RFC PATCH] libtraceevent: Increase libtraceevent logging when verbose
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [RFC PATCH] libtraceevent: Increase libtraceevent logging when verbose
- From: Steven Rostedt <rostedt@xxxxxxxxxxx>
- Date: Thu, 10 Jun 2021 15:32:21 -0400
- Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>, Jiri Olsa <jolsa@xxxxxxxxxx>, Namhyung Kim <namhyung@xxxxxxxxxx>, linux-perf-users <linux-perf-users@xxxxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, Linux-trace Users <linux-trace-users@xxxxxxxxxxxxxxx>, Tzvetomir Stoyanov <tz.stoyanov@xxxxxxxxx>, Stephane Eranian <eranian@xxxxxxxxxx>
- In-reply-to: <CAP-5=fVWCpuC98O=Y3HWCEJspSMWmLwAjhBChStT4APkNboDeQ@mail.gmail.com>
- References: <20210610060643.595673-1-irogers@google.com> <20210610103927.44462e35@oasis.local.home> <CAP-5=fVWCpuC98O=Y3HWCEJspSMWmLwAjhBChStT4APkNboDeQ@mail.gmail.com>
On Thu, 10 Jun 2021 11:50:00 -0700
Ian Rogers <irogers@xxxxxxxxxx> wrote:
> #if LIBTRACE_EVENT_API > 123
> ...
> #endif
>
> so that we can make sure perf is taking advantage of the improvements
> in the libtraceevent API?
Yes, and trace-cmd did that.
In the Makefile:
LIBTRACEEVENT_MIN_VERSION = 1.2.3
TEST_LIBTRACEEVENT = $(shell sh -c "$(PKG_CONFIG) --atleast-version $(LIBTRACEEVENT_MIN_VERSION) libtraceevent > /dev/null 2>&1 && echo y")
ifeq ("$(TEST_LIBTRACEEVENT)", "y")
CFLAGS += -DHAVE_TRACEVEVENT_API
endif
Then you can use in perf
#ifdef HAVE_TRACEEVENT_API
...
#endif
That's just one example of what you could do.
-- Steve
[Index of Archives]
[Linux USB Development]
[Linux USB Development]
[Linux Audio Users]
[Yosemite Hiking]
[Linux Kernel]
[Linux SCSI]