mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
![Michael Petlan](/assets/img/avatar_default.png)
Currently we support only static linking with kernel's libtraceevent (tools/lib/traceevent). This patch adds libtraceevent package detection and support to link perf with it dynamically. The libtraceevent package status is displayed with: $ make VF=1 LIBTRACEEVENT_DYNAMIC=1 ... ... libtraceevent: [ on ] Default behavior remains the same (static linking). Committer testing: $ make LIBTRACEEVENT_DYNAMIC=1 VF=1 O=/tmp/build/perf -C tools/perf install-bin |& grep traceevent Makefile.config:1090: *** Error: No libtraceevent devel library found, please install libtraceevent-devel. Stop. $ Signed-off-by: Michael Petlan <mpetlan@redhat.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> LPU-Reference: 20210428092023.4009-1-mpetlan@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
12 lines
219 B
C
12 lines
219 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include <traceevent/trace-seq.h>
|
|
|
|
int main(void)
|
|
{
|
|
int rv = 0;
|
|
struct trace_seq s;
|
|
trace_seq_init(&s);
|
|
rv += !(s.state == TRACE_SEQ__GOOD);
|
|
trace_seq_destroy(&s);
|
|
return rv;
|
|
}
|