Skip to content

Commit

Permalink
cxl/monitor: fix include paths for tracefs and traceevent
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
stellarhopper committed Feb 24, 2023
1 parent 82884ee commit a598663
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cxl/event_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// Copyright (C) 2022, Intel Corp. All rights reserved.
#include <stdio.h>
#include <errno.h>
#include <event-parse.h>
#include <json-c/json.h>
#include <util/json.h>
#include <util/util.h>
#include <util/strbuf.h>
#include <ccan/list/list.h>
#include <uuid/uuid.h>
#include <traceevent/event-parse.h>
#include <tracefs/tracefs.h>
#include <tracefs.h>
#include "event_trace.h"

#define _GNU_SOURCE
Expand Down
4 changes: 2 additions & 2 deletions cxl/monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <event-parse.h>
#include <json-c/json.h>
#include <libgen.h>
#include <time.h>
Expand All @@ -16,8 +17,7 @@
#include <util/strbuf.h>
#include <sys/epoll.h>
#include <sys/stat.h>
#include <traceevent/event-parse.h>
#include <tracefs/tracefs.h>
#include <tracefs.h>
#include <cxl/libcxl.h>

/* reuse the core log helpers for the monitor logger */
Expand Down

0 comments on commit a598663

Please sign in to comment.