* [PATCH 1/2] kernel-shark: Cleanup in CMakeLists.txt
@ 2021-07-26 9:41 Yordan Karadzhov (VMware)
2021-07-26 9:41 ` [PATCH 2/2] kernel-shark: Treat all tracing headers as library headers Yordan Karadzhov (VMware)
0 siblings, 1 reply; 3+ messages in thread
From: Yordan Karadzhov (VMware) @ 2021-07-26 9:41 UTC (permalink / raw)
To: linux-trace-devel; +Cc: Yordan Karadzhov (VMware)
The CMake variable TRACE CMD INCLUDE_DIR is a leftover from previous
versions of the build system. This variable is no longer set, hance
its usage has no effect.
Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
CMakeLists.txt | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f3449a5..67dfb81 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -132,8 +132,7 @@ else (CMAKE_BUILD_TYPE MATCHES Package)
endif (CMAKE_BUILD_TYPE MATCHES Package)
include_directories(${KS_DIR}/src/
- ${KS_DIR}/build/src/
- ${TRACECMD_INCLUDE_DIR})
+ ${KS_DIR}/build/src/)
message("")
message(STATUS "C flags : " ${CMAKE_C_FLAGS})
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] kernel-shark: Treat all tracing headers as library headers
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)
2021-07-26 13:59 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Yordan Karadzhov (VMware) @ 2021-07-26 9:41 UTC (permalink / raw)
To: linux-trace-devel; +Cc: Yordan Karadzhov (VMware)
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] kernel-shark: Treat all tracing headers as library headers
2021-07-26 9:41 ` [PATCH 2/2] kernel-shark: Treat all tracing headers as library headers Yordan Karadzhov (VMware)
@ 2021-07-26 13:59 ` Steven Rostedt
0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2021-07-26 13:59 UTC (permalink / raw)
To: Yordan Karadzhov (VMware); +Cc: linux-trace-devel
On Mon, 26 Jul 2021 12:41:41 +0300
"Yordan Karadzhov (VMware)" <y.karadz@gmail.com> wrote:
> 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.
Yep, it was "by chance", that we just happened to include the headers
in the main directory in the same paths as were added in the files. But
if we ever changed those paths, the files would not be updated and the
compile would break.
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
to both patches.
Thanks Yordan.
-- Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-26 13:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-26 9:41 [PATCH 1/2] kernel-shark: Cleanup in CMakeLists.txt Yordan Karadzhov (VMware)
2021-07-26 9:41 ` [PATCH 2/2] kernel-shark: Treat all tracing headers as library headers Yordan Karadzhov (VMware)
2021-07-26 13:59 ` Steven Rostedt
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).