Skip to content

Commit a598663

Browse files
committed
cxl/monitor: fix include paths for tracefs and traceevent
Distros vary on whether the above headers are placed in {prefix}/libtracefs/ or {prefix}/tracefs/, and likewise for traceevent. Since both of these libraries do ship with pkgconfig info to determine the exact include path, the respective #include statements can drop the {lib}trace{fs,event}/ prefix. Since the libraries are declared using meson's dependency() function, it already does the requisite pkgconfig parsing. Drop the above prefixes to allow the includes work on all distros. Link: #234 Link: https://lore.kernel.org/r/20230223-meson-build-fixes-v1-1-5fae3b606395@intel.com Fixes: 8dedc6c ("cxl: add a helper to parse trace events into a json object") Fixes: 7b237bc ("cxl: add a helper to go through all current events and parse them") Cc: Dave Jiang <dave.jiang@intel.com> Cc: Dan Williams <dan.j.williams@intel.com> Reported-by: Michal Suchánek <msuchanek@suse.de> Tested-by: Michal Suchánek <msuchanek@suse.de> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
1 parent 82884ee commit a598663

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cxl/event_trace.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
// Copyright (C) 2022, Intel Corp. All rights reserved.
33
#include <stdio.h>
44
#include <errno.h>
5+
#include <event-parse.h>
56
#include <json-c/json.h>
67
#include <util/json.h>
78
#include <util/util.h>
89
#include <util/strbuf.h>
910
#include <ccan/list/list.h>
1011
#include <uuid/uuid.h>
11-
#include <traceevent/event-parse.h>
12-
#include <tracefs/tracefs.h>
12+
#include <tracefs.h>
1313
#include "event_trace.h"
1414

1515
#define _GNU_SOURCE

cxl/monitor.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <stdio.h>
55
#include <unistd.h>
66
#include <errno.h>
7+
#include <event-parse.h>
78
#include <json-c/json.h>
89
#include <libgen.h>
910
#include <time.h>
@@ -16,8 +17,7 @@
1617
#include <util/strbuf.h>
1718
#include <sys/epoll.h>
1819
#include <sys/stat.h>
19-
#include <traceevent/event-parse.h>
20-
#include <tracefs/tracefs.h>
20+
#include <tracefs.h>
2121
#include <cxl/libcxl.h>
2222

2323
/* reuse the core log helpers for the monitor logger */

0 commit comments

Comments
 (0)