linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	linux-perf-users <linux-perf-users@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux-trace Users <linux-trace-users@vger.kernel.org>,
	Tzvetomir Stoyanov <tz.stoyanov@gmail.com>,
	Stephane Eranian <eranian@google.com>
Subject: Re: [RFC PATCH] libtraceevent: Increase libtraceevent logging when verbose
Date: Thu, 10 Jun 2021 15:32:21 -0400	[thread overview]
Message-ID: <20210610153221.476063dc@oasis.local.home> (raw)
In-Reply-To: <CAP-5=fVWCpuC98O=Y3HWCEJspSMWmLwAjhBChStT4APkNboDeQ@mail.gmail.com>

On Thu, 10 Jun 2021 11:50:00 -0700
Ian Rogers <irogers@google.com> 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

  reply	other threads:[~2021-06-10 19:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10  6:06 Ian Rogers
2021-06-10 14:39 ` Steven Rostedt
2021-06-10 18:50   ` Ian Rogers
2021-06-10 19:32     ` Steven Rostedt [this message]
2021-06-10 19:08   ` Jiri Olsa
2021-06-10 19:47     ` Steven Rostedt
2021-06-10 19:59     ` Steven Rostedt
2021-06-10 20:47       ` Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210610153221.476063dc@oasis.local.home \
    --to=rostedt@goodmis.org \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-trace-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tz.stoyanov@gmail.com \
    --subject='Re: [RFC PATCH] libtraceevent: Increase libtraceevent logging when verbose' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).