Skip to content

Commit

Permalink
perf build: Include libtraceevent headers directly indicated by pkg-c…
Browse files Browse the repository at this point in the history
…onfig

Currently the libtraceevent's found by pkg-config, which give the
include path as:

  [root@localhost tmp]# pkg-config --cflags libtraceevent
  -I/usr/local/include/traceevent

So we should include the libtraceevent headers directly without
"traceevent/" prefix. Update all the users.

Fixes: 0f0e1f4 ("perf build: Use pkg-config for feature check for libtrace{event,fs}")
Suggested-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/linux-perf-users/ZyF5_Hf1iL01kldE@google.com/
Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Cc: leo.yan@arm.com
Cc: amadio@gentoo.org
Cc: linuxarm@huawei.com
Link: https://lore.kernel.org/r/20241105105649.45399-1-yangyicong@huawei.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
  • Loading branch information
Yicong Yang authored and Namhyung Kim committed Nov 9, 2024
1 parent e8328bf commit 35de42c
Show file tree
Hide file tree
Showing 23 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion tools/build/feature/test-libtraceevent.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
#include <traceevent/trace-seq.h>
#include <trace-seq.h>

int main(void)
{
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/builtin-kmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <regex.h>

#include <linux/ctype.h>
#include <traceevent/event-parse.h>
#include <event-parse.h>

static int kmem_slab;
static int kmem_page;
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/builtin-kwork.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <subcmd/pager.h>
#include <subcmd/parse-options.h>
#include <traceevent/event-parse.h>
#include <event-parse.h>

#include <errno.h>
#include <inttypes.h>
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
#include <linux/mman.h>

#ifdef HAVE_LIBTRACEEVENT
#include <traceevent/event-parse.h>
#include <event-parse.h>
#endif

struct report {
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/builtin-script.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

#include <linux/ctype.h>
#ifdef HAVE_LIBTRACEEVENT
#include <traceevent/event-parse.h>
#include <event-parse.h>
#endif

static char const *script_name;
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/builtin-timechart.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "util/tracepoint.h"
#include "util/util.h"
#include <linux/err.h>
#include <traceevent/event-parse.h>
#include <event-parse.h>

#ifdef LACKS_OPEN_MEMSTREAM_PROTOTYPE
FILE *open_memstream(char **ptr, size_t *sizeloc);
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/builtin-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
#include <perf/mmap.h>

#ifdef HAVE_LIBTRACEEVENT
#include <traceevent/event-parse.h>
#include <event-parse.h>
#endif

#ifndef O_CLOEXEC
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/tests/evsel-tp-sched.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/err.h>
#include <traceevent/event-parse.h>
#include <event-parse.h>
#include "evsel.h"
#include "tests.h"
#include "debug.h"
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/data-convert-bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "util/sample.h"

#ifdef HAVE_LIBTRACEEVENT
#include <traceevent/event-parse.h>
#include <event-parse.h>
#endif

#define pr_N(n, fmt, ...) \
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/data-convert-json.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "util/tool.h"

#ifdef HAVE_LIBTRACEEVENT
#include <traceevent/event-parse.h>
#include <event-parse.h>
#endif

struct convert_json {
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <linux/ctype.h>

#ifdef HAVE_LIBTRACEEVENT
#include <traceevent/event-parse.h>
#include <event-parse.h>
#else
#define LIBTRACEEVENT_VERSION 0
#endif
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/evsel.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
#include <linux/ctype.h>

#ifdef HAVE_LIBTRACEEVENT
#include <traceevent/event-parse.h>
#include <event-parse.h>
#endif

struct perf_missing_features perf_missing_features;
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/evsel_fprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "dso.h"

#ifdef HAVE_LIBTRACEEVENT
#include <traceevent/event-parse.h>
#include <event-parse.h>
#endif

static int comma_fprintf(FILE *fp, bool *first, const char *fmt, ...)
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/header.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
#include <internal/lib.h>

#ifdef HAVE_LIBTRACEEVENT
#include <traceevent/event-parse.h>
#include <event-parse.h>
#endif

/*
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/python.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <linux/err.h>
#include <perf/cpumap.h>
#ifdef HAVE_LIBTRACEEVENT
#include <traceevent/event-parse.h>
#include <event-parse.h>
#endif
#include <perf/mmap.h>
#include "evlist.h"
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/scripting-engines/trace-event-perl.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <errno.h>
#include <linux/bitmap.h>
#include <linux/time64.h>
#include <traceevent/event-parse.h>
#include <event-parse.h>

#include <stdbool.h>
/* perl needs the following define, right after including stdbool.h */
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/scripting-engines/trace-event-python.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <linux/compiler.h>
#include <linux/time64.h>
#ifdef HAVE_LIBTRACEEVENT
#include <traceevent/event-parse.h>
#include <event-parse.h>
#endif

#include "../build-id.h"
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <linux/string.h>

#ifdef HAVE_LIBTRACEEVENT
#include <traceevent/event-parse.h>
#include <event-parse.h>
#endif

regex_t parent_regex;
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/trace-event-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include <linux/ctype.h>
#include <linux/kernel.h>
#include <traceevent/event-parse.h>
#include <event-parse.h>

static int get_common_field(struct scripting_context *context,
int *offset, int *size, const char *type)
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/trace-event-read.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <traceevent/event-parse.h>
#include <event-parse.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/trace-event-scripting.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <string.h>
#include <errno.h>
#ifdef HAVE_LIBTRACEEVENT
#include <traceevent/event-parse.h>
#include <event-parse.h>
#endif

#include "debug.h"
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/trace-event.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <fcntl.h>
#include <linux/kernel.h>
#include <linux/err.h>
#include <traceevent/event-parse.h>
#include <event-parse.h>
#include <api/fs/tracing_path.h>
#include <api/fs/fs.h>
#include "trace-event.h"
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/trace-event.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ int common_lock_depth(struct scripting_context *context);
int perf_sample__sprintf_flags(u32 flags, char *str, size_t sz);

#if defined(LIBTRACEEVENT_VERSION) && LIBTRACEEVENT_VERSION >= MAKE_LIBTRACEEVENT_VERSION(1, 5, 0)
#include <traceevent/event-parse.h>
#include <event-parse.h>

static inline bool tep_field_is_relative(unsigned long flags)
{
Expand Down

0 comments on commit 35de42c

Please sign in to comment.