All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Ian Rogers <irogers@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Leo Yan <leo.yan@linaro.org>,
	Kan Liang <kan.liang@linux.intel.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH v2 3/4] perf build: Use libtraceevent from the system
Date: Fri, 2 Dec 2022 15:29:50 -0300	[thread overview]
Message-ID: <Y4pEHlmaT1i3j23J@kernel.org> (raw)
In-Reply-To: <CAM9d7chsymFFq1di15w+s7jtDenV=kFnk=EDrFO_rDWcSQSa6g@mail.gmail.com>

Em Fri, Dec 02, 2022 at 10:08:04AM -0800, Namhyung Kim escreveu:
> On Wed, Nov 30, 2022 at 12:13 PM Ian Rogers <irogers@google.com> wrote:
> >
> > On Wed, Nov 30, 2022 at 11:05 AM Namhyung Kim <namhyung@kernel.org> wrote:
> > >
> > > On Tue, Nov 29, 2022 at 10:30 PM Ian Rogers <irogers@google.com> wrote:
> > > >
> > > > Remove the LIBTRACEEVENT_DYNAMIC and LIBTRACEFS_DYNAMIC. If
> > > > libtraceevent isn't installed or NO_LIBTRACEEVENT=1 is passed to the
> > > > build, don't compile in libtraceevent and libtracefs support. This
> > > > also disables CONFIG_TRACE that controls "perf
> > > > trace". CONFIG_TRACEEVENT is used to control enablement in
> > > > Build/Makefiles, HAVE_LIBTRACEEVENT is used in C code. Without
> > > > HAVE_LIBTRACEEVENT tracepoints are disabled and as such the commands
> > > > kmem, kwork, lock, sched and timechart are removed. The majority of
> > > > commands continue to work including "perf test".
> > >
> > > Maybe we can have a different approach.  I guess the trace data
> > > access is isolated then we can make dummy interfaces when there's
> > > no libtraceevent.  This way we don't need to touch every command
> > > and let it fail when it's asked.
> >
> > Sounds like a worthwhile refactor that can land on top of this change.
> >
> > > The motivation is that we should be able to run the sub-commands
> > > as much as possible.  In fact, we could run 'record' part only on the
> > > target machine and pass the data to the host for analysis with a
> > > full-fledged perf.  Also some commands like 'perf lock contention'
> > > can run with or without libtraceevent (using BPF only).
> >
> > The issue here is that perf lock contention will use evsel__new_tp and
> > internally that uses libtraceevent. As such it is removed without
> > HAVE_LIBTRACEEVENT. Without the evsel there's not much perf lock
> > contention can do, so rather than litter the code with
> > HAVE_LIBTRACEEVENT and for it to be broken, I made the choice just to
> > remove it from the no libtraceevent build for now.
> 
> I don't think it needs evsel__new_tp() when BPF is used.
> The BPF program is attached to the raw tracepoint without
> perf_event and the result is written to the BPF map.
> 
> >
> > I think it is worth pursuing these patches in the shape they are in so
> > that we can land the removal of tools/lib/traceevent and ensure the
> > migration away from an out-of-date version of that library.
> 
> Yeah, I agree that we should remove the stale libtraceevent but
> I'd like to do it with minimal changes in the perf code base.
> Let me take a look at this.

Ok, was going to take a look at this patchkit, will wait for you now.

- Arnaldo

  reply	other threads:[~2022-12-02 18:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-30  6:29 [PATCH v2 0/4] perf use system libtraceevent Ian Rogers
2022-11-30  6:29 ` [PATCH v2 1/4] perf util: Make header guard consistent with tool Ian Rogers
2022-11-30 18:47   ` Namhyung Kim
2022-11-30  6:29 ` [PATCH v2 2/4] perf util: Add host_is_bigendian to util.h Ian Rogers
2022-11-30 18:52   ` Namhyung Kim
2022-12-05 13:16     ` Arnaldo Carvalho de Melo
2022-11-30  6:29 ` [PATCH v2 3/4] perf build: Use libtraceevent from the system Ian Rogers
2022-11-30 19:05   ` Namhyung Kim
2022-11-30 20:13     ` Ian Rogers
2022-12-02 18:08       ` Namhyung Kim
2022-12-02 18:29         ` Arnaldo Carvalho de Melo [this message]
2022-12-02 19:45           ` Ian Rogers
2022-12-02 23:36             ` Namhyung Kim
2022-11-30  6:29 ` [PATCH v2 4/4] tools lib traceevent: Remove libtraceevent Ian Rogers
2022-12-12 19:52   ` Arnaldo Carvalho de Melo
2022-12-12 20:10     ` Arnaldo Carvalho de Melo
2022-12-05 13:01 ` [PATCH v2 0/4] perf use system libtraceevent Arnaldo Carvalho de Melo

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=Y4pEHlmaT1i3j23J@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=leo.yan@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.