From: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
To: linux-trace-devel@vger.kernel.org
Cc: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
Subject: [PATCH 2/2] kernel-shark: Treat all tracing headers as library headers
Date: Mon, 26 Jul 2021 12:41:41 +0300 [thread overview]
Message-ID: <20210726094141.191579-2-y.karadz@gmail.com> (raw)
In-Reply-To: <20210726094141.191579-1-y.karadz@gmail.com>
The CMake scripts used to discover all tracing libraries are modified
such that the full path to the header is determined. Later there is
no need to add that part when the headers are included. Using angular
brackets ('<' and '>') denotes that it is a library header and not a
local one.
1. Note that this patch actually fixes a build failure, caused by the
following commit in libtracefs:
880885d (libtracefs: Remove "traceevent/" from referencing libtraceevent headers)
It seems that so far the discovery of the headers was working more or
less by chance.
2. Note that after applying the patch you may need to clean the Cmake
cache (running cmake_clean.sh).
Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
build/FindTraceCmd.cmake | 2 +-
build/FindTraceEvent.cmake | 2 +-
build/FindTraceFS.cmake | 2 +-
src/KsAdvFilteringDialog.cpp | 2 +-
src/libkshark-tepdata.c | 3 +--
src/plugins/sched_events.c | 2 +-
6 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/build/FindTraceCmd.cmake b/build/FindTraceCmd.cmake
index 23eefed..602eac5 100644
--- a/build/FindTraceCmd.cmake
+++ b/build/FindTraceCmd.cmake
@@ -42,7 +42,7 @@ pkg_check_modules(PC_TraceCmd QUIET libtracecmd)
set(TraceCmd_VERSION ${PC_TraceCmd_VERSION})
set(TraceCmd_DEFINITIONS ${PC_TraceCmd_CFLAGS_OTHER})
-find_path(TraceCmd_INCLUDE_DIR NAMES trace-cmd/trace-cmd.h
+find_path(TraceCmd_INCLUDE_DIR NAMES trace-cmd.h
HINTS ${PC_TraceCmd_INCLUDE_DIRS}
${PC_TraceCmd_INCLUDEDIR})
diff --git a/build/FindTraceEvent.cmake b/build/FindTraceEvent.cmake
index ae391b6..668a5de 100644
--- a/build/FindTraceEvent.cmake
+++ b/build/FindTraceEvent.cmake
@@ -42,7 +42,7 @@ pkg_check_modules(PC_TraceEvent QUIET libtraceevent)
set(TraceEvent_VERSION ${PC_TraceEvent_VERSION})
set(TraceEvent_DEFINITIONS ${PC_TraceEvent_CFLAGS_OTHER})
-find_path(TraceEvent_INCLUDE_DIR NAMES traceevent/event-parse.h
+find_path(TraceEvent_INCLUDE_DIR NAMES event-parse.h
HINTS ${PC_TraceEvent_INCLUDE_DIRS}
${PC_TraceEvent_INCLUDEDIR})
diff --git a/build/FindTraceFS.cmake b/build/FindTraceFS.cmake
index 82fa012..251b506 100644
--- a/build/FindTraceFS.cmake
+++ b/build/FindTraceFS.cmake
@@ -42,7 +42,7 @@ pkg_check_modules(PC_TraceFS QUIET libtracefs)
set(TraceFS_VERSION ${PC_TraceFS_VERSION})
set(TraceFS_DEFINITIONS ${PC_TraceFS_CFLAGS_OTHER})
-find_path(TraceFS_INCLUDE_DIR NAMES tracefs/tracefs.h
+find_path(TraceFS_INCLUDE_DIR NAMES tracefs.h
HINTS ${PC_TraceFS_INCLUDE_DIRS}
${PC_TraceFS_INCLUDEDIR})
diff --git a/src/KsAdvFilteringDialog.cpp b/src/KsAdvFilteringDialog.cpp
index 2fdb624..f01467d 100644
--- a/src/KsAdvFilteringDialog.cpp
+++ b/src/KsAdvFilteringDialog.cpp
@@ -10,7 +10,7 @@
*/
// trace-cmd
-#include "trace-cmd/trace-cmd.h"
+#include <trace-cmd.h>
// KernelShark
#include "libkshark.h"
diff --git a/src/libkshark-tepdata.c b/src/libkshark-tepdata.c
index acc554b..865ca82 100644
--- a/src/libkshark-tepdata.c
+++ b/src/libkshark-tepdata.c
@@ -21,8 +21,7 @@
#include <string.h>
// trace-cmd
-#include "trace-cmd/trace-cmd.h"
-#include "tracefs/tracefs.h"
+#include <trace-cmd.h>
// KernelShark
#include "libkshark.h"
diff --git a/src/plugins/sched_events.c b/src/plugins/sched_events.c
index 659ecc3..83c2520 100644
--- a/src/plugins/sched_events.c
+++ b/src/plugins/sched_events.c
@@ -14,7 +14,7 @@
#include <stdio.h>
// trace-cmd
-#include "trace-cmd/trace-cmd.h"
+#include <trace-cmd.h>
// KernelShark
#include "plugins/sched_events.h"
--
2.27.0
next prev parent reply other threads:[~2021-07-26 9:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-26 9:41 [PATCH 1/2] kernel-shark: Cleanup in CMakeLists.txt Yordan Karadzhov (VMware)
2021-07-26 9:41 ` Yordan Karadzhov (VMware) [this message]
2021-07-26 13:59 ` [PATCH 2/2] kernel-shark: Treat all tracing headers as library headers Steven Rostedt
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=20210726094141.191579-2-y.karadz@gmail.com \
--to=y.karadz@gmail.com \
--cc=linux-trace-devel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).