Skip to contentSkip to conversation

build: Add c++ build support

PATCH Superseded Hongzhan Chen 2 participants 6 messages Mar 4, 2022 – Mar 8, 2022 Kbuild

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/3 build: Add c++ build support

Add c++ build support or use specific c++ compiler

---
 configure.ac | 12 ++++++++++++
 1 file changed, 12 insertions(+)
configure.ac +12 -0
index 0389cf008..16cffd8f8 100644
@@ -79,6 +79,18 @@ AC_ARG_WITH(cc,
     ])
 AC_PROG_CC
 
+AC_ARG_WITH(cxx,
+    AS_HELP_STRING([--with-cxx=compiler],[use specific C++ compiler]),
+    [
+	case "$withval" in
+	"" | y | ye | yes | n | no)
+	    AC_MSG_ERROR([You must supply an argument to --with-cxx])
+	  ;;
+	esac
+	CXX="$withval"
+    ])
+AC_PROG_CXX
+
 # Do not let autoconf set the default value of CFLAGS
 if $XENO_EMPTY_CFLAGS; then
 	CFLAGS=""
Signature · 1 line
2.17.1
#1 lore raw

PATCH v4 2/3 KernelShark: Add xenomai_cobalt_switch_events plugin for KernelShark

For Xenomai-cobalt enabled system, cobalt_switch_context means that there is schedule and context switch in companion core(realtime core), which we may need to do special treatment and take correct action as main kernel sched_switch to visualize out-of-band state of realtime tasks running in cobalt core. To achive our target, we implement following:

1. store corresponding cobalt_switch_context events into container data.
2. modify pid stored in entry to be equal to next_pid to show correct color in cpu bar when cobalt_switch_context event happen.
3. show blue hollow box to mark out-of-band state according to cobalt_switch_context events.
4. clickable cobalt_switch_context plugin shapes.

---
 Makefile.am                                   |   4 +
 configure.ac                                  |  27 +++
 tracing/Makefile.am                           |   6 +
 tracing/kernelshark/CobaltSwitchEvents.cpp    | 156 ++++++++++++++++
 tracing/kernelshark/Makefile.am               |  13 ++
 tracing/kernelshark/README                    |  75 ++++++++
 .../xenomai_cobalt_switch_events.c            | 174 ++++++++++++++++++
 .../xenomai_cobalt_switch_events.h            |  58 ++++++
 8 files changed, 513 insertions(+)
 create mode 100644 tracing/Makefile.am
 create mode 100644 tracing/kernelshark/CobaltSwitchEvents.cpp
 create mode 100644 tracing/kernelshark/Makefile.am
 create mode 100644 tracing/kernelshark/README
 create mode 100644 tracing/kernelshark/xenomai_cobalt_switch_events.c
 create mode 100644 tracing/kernelshark/xenomai_cobalt_switch_events.h
Makefile.am +4 -0
index 604644277..bd3e4bfb1 100644
@@ -18,6 +18,9 @@ SUBDIRS += 		\
 	testsuite
 endif
 
+SUBDIRS +=		\
+	tracing
+
 EXTRA_DIST = kernel debian
 
 DIST_SUBDIRS =		\
@@ -26,6 +29,7 @@ DIST_SUBDIRS =		\
 	doc		\
 	include		\
 	lib 		\
+	tracing		\
 	scripts		\
 	testsuite	\
 	utils
configure.ac +27 -0
index 16cffd8f8..d282009e0 100644
@@ -826,6 +826,26 @@ AC_ARG_WITH(demodir,
     ], [XENO_DEMO_DIR=$demodir])
 AC_MSG_RESULT($XENO_DEMO_DIR)
 
+xeno_build_kernelshark=false
+AC_MSG_CHECKING(build kernelshark plugins)
+AC_ARG_WITH(kernelsharkdir,
+	    AS_HELP_STRING([--with-kernelsharkdir=<prefix-include-dir>],[Prefix location of header file for building kernelshark related plugins. For example: /usr/local/include/]),
+    [
+	case "$withval" in
+	"" | y | ye | yes | n | no)
+	    AC_MSG_ERROR([You must supply an argument to --with-kernelsharkdir])
+	  ;;
+	esac
+	KS_INCLUDS="${withval}/kernelshark"
+	TRACECMD_INCLUDS="${withval}/trace-cmd"
+	TRACEFS_INCLUDS="${withval}/tracefs"
+	TRACEEVENR_INCLUDS="${withval}/traceevent"
+	xeno_build_kernelshark=true
+    ], [xeno_build_kernelshark=false])
+AC_MSG_RESULT($xeno_build_kernelshark)
+
+AM_CONDITIONAL([BUILD_KERNELSHARK], [test x$xeno_build_kernelshark = xtrue])
+
 AC_MSG_CHECKING([for test source generation])
 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])],
     [AC_MSG_RESULT(ok)], [AC_MSG_RESULT(failed)], [AC_MSG_RESULT(untestable)])
@@ -936,6 +956,11 @@ AC_SUBST(XENO_DEMO_DIR)
 AC_SUBST(XENO_BUILD_COMPILER)
 AC_SUBST(XENO_BUILD_ARGS)
 AC_SUBST(CORE)
+AC_SUBST(KS_INCLUDS)
+AC_SUBST(TRACECMD_INCLUDS)
+AC_SUBST(TRACEFS_INCLUDS)
+AC_SUBST(TRACEEVENR_INCLUDS)
+
 
 AC_CONFIG_FILES([ \
 	Makefile \
@@ -943,6 +968,8 @@ AC_CONFIG_FILES([ \
 	scripts/Makefile \
 	scripts/xeno-config:scripts/xeno-config-$rtcore_type.in \
 	scripts/xeno \
+	tracing/Makefile \
+	tracing/kernelshark/Makefile \
 	lib/Makefile \
 	lib/boilerplate/Makefile \
 	lib/boilerplate/init/Makefile \
tracing/Makefile.am new file +6 -0
new file mode 100644
index 000000000..25c3e033c
@@ -0,0 +1,6 @@
+if BUILD_KERNELSHARK
+SUBDIRS = kernelshark
+endif
+
+DIST_SUBDIRS = 		\
+	kernelshark
tracing/kernelshark/CobaltSwitchEvents.cpp new file +156 -0

156 lines not on this page · raw message

tracing/kernelshark/Makefile.am new file +13 -0
new file mode 100644
index 000000000..c8fa7ae8f
@@ -0,0 +1,13 @@
+
+lib_LTLIBRARIES = libplugin_xenomai_cobalt_switch_events.la
+
+libplugin_xenomai_cobalt_switch_events_la_SOURCES =	\
+	CobaltSwitchEvents.cpp			\
+	xenomai_cobalt_switch_events.c		\
+	xenomai_cobalt_switch_events.h
+
+libplugin_xenomai_cobalt_switch_events_la_CPPFLAGS =	\
+	-I$(KS_INCLUDS)					\
+	-I$(TRACECMD_INCLUDS)				\
+	-I$(TRACEFS_INCLUDS)				\
+	-I$(TRACEEVENR_INCLUDS)
tracing/kernelshark/README new file +75 -0

75 lines not on this page · raw message

tracing/kernelshark/xenomai_cobalt_switch_events.c new file +174 -0

174 lines not on this page · raw message

tracing/kernelshark/xenomai_cobalt_switch_events.h new file +58 -0

58 lines not on this page · raw message

Signature · 1 line
2.17.1
#2 lore raw

PATCH v4 3/3 libtraceevent: Add xenomai_schedparams plugin for libtraceevent

In reply to Hongzhan Chen

For cobalt thread, there is special struct param_ex data stored in data record, we need to parse and print its content out correctly
to hint user.

---
 configure.ac                                  |  18 ++
 tracing/Makefile.am                           |  15 +-
 tracing/libtraceevent/Makefile.am             |   9 +
 tracing/libtraceevent/README                  |  30 ++++
 .../plugin_xenomai_schedparams.c              | 158 ++++++++++++++++++
 5 files changed, 229 insertions(+), 1 deletion(-)
 create mode 100644 tracing/libtraceevent/Makefile.am
 create mode 100644 tracing/libtraceevent/README
 create mode 100644 tracing/libtraceevent/plugin_xenomai_schedparams.c
configure.ac +18 -0
index d282009e0..0b19e495b 100644
@@ -846,6 +846,23 @@ AC_MSG_RESULT($xeno_build_kernelshark)
 
 AM_CONDITIONAL([BUILD_KERNELSHARK], [test x$xeno_build_kernelshark = xtrue])
 
+xeno_build_libtraceevent=false
+AC_MSG_CHECKING(build libtraceevent plugin)
+AC_ARG_WITH(libtraceeventdir,
+    AS_HELP_STRING([--with-libtraceeventdir],[Prefix location of header file for building libtraceevent plugin. For example: /usr/local/include/]),
+    [
+	case "$withval" in
+	"" | y | ye | yes | n | no)
+	    AC_MSG_ERROR([You must supply an argument to --with-libtraceeventdir])
+	  ;;
+	esac
+	TRACEEVENR_INCLUDS="${withval}/traceevent"
+	xeno_build_libtraceevent=true
+    ], [xeno_build_libtraceevent=false])
+AC_MSG_RESULT($xeno_build_libtraceevent)
+
+AM_CONDITIONAL([BUILD_LIBTRACEEVENT], [test x$xeno_build_libtraceevent = xtrue])
+
 AC_MSG_CHECKING([for test source generation])
 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])],
     [AC_MSG_RESULT(ok)], [AC_MSG_RESULT(failed)], [AC_MSG_RESULT(untestable)])
@@ -970,6 +987,7 @@ AC_CONFIG_FILES([ \
 	scripts/xeno \
 	tracing/Makefile \
 	tracing/kernelshark/Makefile \
+	tracing/libtraceevent/Makefile \
 	lib/Makefile \
 	lib/boilerplate/Makefile \
 	lib/boilerplate/init/Makefile \
tracing/Makefile.am +14 -1
index 25c3e033c..8f3d20adf 100644
@@ -1,6 +1,19 @@
 if BUILD_KERNELSHARK
 SUBDIRS = kernelshark
+
+if BUILD_LIBTRACEEVENT
+SUBDIRS +=	 \
+	libtraceevent
+endif
+
+else
+
+if BUILD_LIBTRACEEVENT
+SUBDIRS = libtraceevent
+endif
+
 endif
 
 DIST_SUBDIRS = 		\
-	kernelshark
+	kernelshark	\
+	libtraceevent
tracing/libtraceevent/Makefile.am new file +9 -0
new file mode 100644
index 000000000..d8bf05412
@@ -0,0 +1,9 @@
+
+lib_LTLIBRARIES = libplugin_xenomai_schedparams.la
+
+libplugin_xenomai_schedparams_la_SOURCES =	\
+	plugin_xenomai_schedparams.c
+
+libplugin_xenomai_schedparams_la_CPPFLAGS =	\
+	-I$(TRACEEVENR_INCLUDS)			\
+	-I$(top_srcdir)/include
tracing/libtraceevent/README new file +30 -0
new file mode 100644
index 000000000..c15088b02
@@ -0,0 +1,30 @@
+
+What is it?
+=============
+
+  It is Xenomai plugin on libtracevent to parse struct param_ex
+  out correctly for trace log.
+
+How to compile?
+================================
+
+Preparation:
+
+  - GIT clone:
+
+      https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git
+
+  - build and install libtraceevent:
+
+      make;
+      sudo make install
+
+How to use built lib?
+===============================
+
+  Please copy built libplugin_xenomai_schedparams.so to
+  /usr/local/lib/traceevent/plugins/ or
+  /usr/local/lib64/traceevent/plugins/ depending on your system.
+  While libtracevent and its plugins is installed correctly, the plugins
+  would be loaded automatically by other module such as libtracecmd after
+  corresponding tracing tool run such as kernelshark or tracecmd.
tracing/libtraceevent/plugin_xenomai_schedparams.c new file +158 -0

158 lines not on this page · raw message

Signature · 1 line
2.17.1
#3 lore raw

Re: [PATCH v4 3/3] libtraceevent: Add xenomai_schedparams plugin for libtraceevent

Quoted 118 lines · Hongzhan Chen

For cobalt thread, there is special struct param_ex data stored in data record, we need to parse and print its content out correctly
to hint user.

---
 configure.ac                                  |  18 ++
 tracing/Makefile.am                           |  15 +-
 tracing/libtraceevent/Makefile.am             |   9 +
 tracing/libtraceevent/README                  |  30 ++++
 .../plugin_xenomai_schedparams.c              | 158 ++++++++++++++++++
 5 files changed, 229 insertions(+), 1 deletion(-)
 create mode 100644 tracing/libtraceevent/Makefile.am
 create mode 100644 tracing/libtraceevent/README
 create mode 100644 tracing/libtraceevent/plugin_xenomai_schedparams.c
configure.ac +18 -0
index d282009e0..0b19e495b 100644
@@ -846,6 +846,23 @@ AC_MSG_RESULT($xeno_build_kernelshark)
 
 AM_CONDITIONAL([BUILD_KERNELSHARK], [test x$xeno_build_kernelshark = xtrue])
 
+xeno_build_libtraceevent=false
+AC_MSG_CHECKING(build libtraceevent plugin)
+AC_ARG_WITH(libtraceeventdir,
+    AS_HELP_STRING([--with-libtraceeventdir],[Prefix location of header file for building libtraceevent plugin. For example: /usr/local/include/]),
+    [
+	case "$withval" in
+	"" | y | ye | yes | n | no)
+	    AC_MSG_ERROR([You must supply an argument to --with-libtraceeventdir])
+	  ;;
+	esac
+	TRACEEVENR_INCLUDS="${withval}/traceevent"
+	xeno_build_libtraceevent=true
+    ], [xeno_build_libtraceevent=false])
+AC_MSG_RESULT($xeno_build_libtraceevent)
+
+AM_CONDITIONAL([BUILD_LIBTRACEEVENT], [test x$xeno_build_libtraceevent = xtrue])
+
 AC_MSG_CHECKING([for test source generation])
 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])],
     [AC_MSG_RESULT(ok)], [AC_MSG_RESULT(failed)], [AC_MSG_RESULT(untestable)])
@@ -970,6 +987,7 @@ AC_CONFIG_FILES([ \
 	scripts/xeno \
 	tracing/Makefile \
 	tracing/kernelshark/Makefile \
+	tracing/libtraceevent/Makefile \
 	lib/Makefile \
 	lib/boilerplate/Makefile \
 	lib/boilerplate/init/Makefile \
tracing/Makefile.am +14 -1
index 25c3e033c..8f3d20adf 100644
@@ -1,6 +1,19 @@
 if BUILD_KERNELSHARK
 SUBDIRS = kernelshark
+
+if BUILD_LIBTRACEEVENT
+SUBDIRS +=	 \
+	libtraceevent
+endif
+
+else
+
+if BUILD_LIBTRACEEVENT
+SUBDIRS = libtraceevent
+endif
+
 endif
 
 DIST_SUBDIRS = 		\
-	kernelshark
+	kernelshark	\
+	libtraceevent
tracing/libtraceevent/Makefile.am new file +9 -0
new file mode 100644
index 000000000..d8bf05412
@@ -0,0 +1,9 @@
+
+lib_LTLIBRARIES = libplugin_xenomai_schedparams.la
+
+libplugin_xenomai_schedparams_la_SOURCES =	\
+	plugin_xenomai_schedparams.c
+
+libplugin_xenomai_schedparams_la_CPPFLAGS =	\
+	-I$(TRACEEVENR_INCLUDS)			\
+	-I$(top_srcdir)/include
tracing/libtraceevent/README new file +20 -0
new file mode 100644
index 000000000..c15088b02
@@ -0,0 +1,30 @@
+
+What is it?
+=============
+
+  It is Xenomai plugin on libtracevent to parse struct param_ex
+  out correctly for trace log.
+
+How to compile?
+================================
+
+Preparation:
+
+  - GIT clone:
+
+      https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git
+
+  - build and install libtraceevent:
+
+      make;
+      sudo make install

tracing/libtraceevent/README line 30

Quoted 10 lines
tracing/libtraceevent/README new file +10 -0
+
+How to use built lib?
+===============================
+
+  Please copy built libplugin_xenomai_schedparams.so to
+  /usr/local/lib/traceevent/plugins/ or
+  /usr/local/lib64/traceevent/plugins/ depending on your system.
+  While libtracevent and its plugins is installed correctly, the plugins
+  would be loaded automatically by other module such as libtracecmd after
+  corresponding tracing tool run such as kernelshark or tracecmd.

I should use the changes below to switch to pkg-config - that permits control over the installation path as well.

In addition, Xenomai should install the plugins properly, into the same folders as kernelshark and libtraceevent use.

Jan

configure.ac +43 -35
index 0b19e495b2..e005f16873 100644
@@ -826,42 +826,46 @@ AC_ARG_WITH(demodir,
     ], [XENO_DEMO_DIR=$demodir])
 AC_MSG_RESULT($XENO_DEMO_DIR)
 
-xeno_build_kernelshark=false
-AC_MSG_CHECKING(build kernelshark plugins)
-AC_ARG_WITH(kernelsharkdir,
-	    AS_HELP_STRING([--with-kernelsharkdir=<prefix-include-dir>],[Prefix location of header file for building kernelshark related plugins. For example: /usr/local/include/]),
-    [
-	case "$withval" in
-	"" | y | ye | yes | n | no)
-	    AC_MSG_ERROR([You must supply an argument to --with-kernelsharkdir])
-	  ;;
-	esac
-	KS_INCLUDS="${withval}/kernelshark"
-	TRACECMD_INCLUDS="${withval}/trace-cmd"
-	TRACEFS_INCLUDS="${withval}/tracefs"
-	TRACEEVENR_INCLUDS="${withval}/traceevent"
-	xeno_build_kernelshark=true
-    ], [xeno_build_kernelshark=false])
-AC_MSG_RESULT($xeno_build_kernelshark)
-
-AM_CONDITIONAL([BUILD_KERNELSHARK], [test x$xeno_build_kernelshark = xtrue])
-
-xeno_build_libtraceevent=false
-AC_MSG_CHECKING(build libtraceevent plugin)
-AC_ARG_WITH(libtraceeventdir,
-    AS_HELP_STRING([--with-libtraceeventdir],[Prefix location of header file for building libtraceevent plugin. For example: /usr/local/include/]),
-    [
-	case "$withval" in
-	"" | y | ye | yes | n | no)
-	    AC_MSG_ERROR([You must supply an argument to --with-libtraceeventdir])
-	  ;;
-	esac
-	TRACEEVENR_INCLUDS="${withval}/traceevent"
-	xeno_build_libtraceevent=true
-    ], [xeno_build_libtraceevent=false])
-AC_MSG_RESULT($xeno_build_libtraceevent)
+kernelshark_plugin=
+AC_MSG_CHECKING(whether KernelShark plugin should be built)
+AC_ARG_ENABLE(kernelshark_plugin,
+	AS_HELP_STRING([--enable-kernelshark-plugin], [build KernelShark plugin]),
+	[case "$enableval" in
+	y | yes) kernelshark_plugin=y ;;
+	/*) kernelshark_plugin=y ;;
+	*) unset kernelshark_plugin ;;
+	esac])
+AC_MSG_RESULT(${kernelshark_plugin:-no})
+AM_CONDITIONAL(XENO_KSHARK_PLUGIN, [test x$kernelshark_plugin = xy])
+
+libtraceevent_plugin=
+AC_MSG_CHECKING(whether libtraceevent plugin should be built)
+AC_ARG_ENABLE(libtraceevent_plugin,
+	AS_HELP_STRING([--enable-libtraceevent-plugin], [build libtraceevent plugin]),
+	[case "$enableval" in
+	y | yes) libtraceevent_plugin=y ;;
+	/*) libtraceevent_plugin=y ;;
+	*) unset libtraceevent_plugin ;;
+	esac])
+AC_MSG_RESULT(${libtraceevent_plugin:-no})
+AM_CONDITIONAL(XENO_LIBTRACEEVENT_PLUGIN, [test x$libtraceevent_plugin = xy])
 
-AM_CONDITIONAL([BUILD_LIBTRACEEVENT], [test x$xeno_build_libtraceevent = xtrue])
+if test x$kernelshark_plugin = xy -o x$libtraceevent_plugin = xy; then
+	PKG_CHECK_MODULES(LIBTRACEEVENT, libtraceevent)
+fi
+
+if test x$kernelshark_plugin = xy; then
+	PKG_CHECK_MODULES(LIBKSHARK, libkshark)
+	PKG_CHECK_MODULES(LIBTRACECMD, libtracecmd)
+	PKG_CHECK_MODULES(LIBTRACEFS, libtracefs)
+	XENO_KSHARK_PLUGIN_CFLAGS="$LIBKSHARK_CFLAGS $LIBTRACEEVENT_CFLAGS $LIBTRACECMD_CFLAGS $LIBTRACEFS_CFLAGS"
+	XENO_KSHARK_PLUGIN_LDFLAGS="$LIBKSHARK_LIBS $LIBTRACEEVENT_LDFLAGS $LIBTRACECMD_LDFLAGS $LIBTRACEFS_LDFLAGS"
+fi
+
+if test x$libtraceevent_plugin = xy; then
+	XENO_LIBTRACEEVENT_PLUGIN_CFLAGS="$LIBTRACEEVENT_CFLAGS"
+	XENO_LIBTRACEEVENT_PLUGIN_LDFLAGS="$LIBTRACEEVENT_LDFLAGS"
+fi
 
 AC_MSG_CHECKING([for test source generation])
 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ]], [[ ]])],
@@ -968,6 +972,10 @@ AC_SUBST(XENO_USER_LDADD)
 AC_SUBST(XENO_USER_APP_CFLAGS)
 AC_SUBST(XENO_USER_APP_LDFLAGS)
 AC_SUBST(XENO_FUSE_CFLAGS)
+AC_SUBST(XENO_KSHARK_PLUGIN_CFLAGS)
+AC_SUBST(XENO_KSHARK_PLUGIN_LDFLAGS)
+AC_SUBST(XENO_LIBTRACEEVENT_PLUGIN_CFLAGS)
+AC_SUBST(XENO_LIBTRACEEVENT_PLUGIN_LDFLAGS)
 AC_SUBST(XENO_TEST_DIR)
 AC_SUBST(XENO_DEMO_DIR)
 AC_SUBST(XENO_BUILD_COMPILER)
tracing/Makefile.am +5 -11
index 8f3d20adfc..da7d979f9a 100644
@@ -1,17 +1,11 @@
-if BUILD_KERNELSHARK
-SUBDIRS = kernelshark
+SUBDIRS =
 
-if BUILD_LIBTRACEEVENT
-SUBDIRS +=	 \
-	libtraceevent
-endif
-
-else
-
-if BUILD_LIBTRACEEVENT
-SUBDIRS = libtraceevent
+if XENO_KSHARK_PLUGIN
+SUBDIRS += kernelshark
 endif
 
+if XENO_LIBTRACEEVENT_PLUGIN
+SUBDIRS += libtraceevent
 endif
 
 DIST_SUBDIRS = 		\
tracing/kernelshark/Makefile.am +6 -7
index c8fa7ae8f4..a8337c2704 100644
@@ -1,13 +1,12 @@
-
 lib_LTLIBRARIES = libplugin_xenomai_cobalt_switch_events.la
 
 libplugin_xenomai_cobalt_switch_events_la_SOURCES =	\
-	CobaltSwitchEvents.cpp			\
-	xenomai_cobalt_switch_events.c		\
+	CobaltSwitchEvents.cpp				\
+	xenomai_cobalt_switch_events.c			\
 	xenomai_cobalt_switch_events.h
 
 libplugin_xenomai_cobalt_switch_events_la_CPPFLAGS =	\
-	-I$(KS_INCLUDS)					\
-	-I$(TRACECMD_INCLUDS)				\
-	-I$(TRACEFS_INCLUDS)				\
-	-I$(TRACEEVENR_INCLUDS)
+	@XENO_KSHARK_PLUGIN_CFLAGS@
+
+libplugin_xenomai_cobalt_switch_events_la_LDFLAGS =	\
+	@XENO_KSHARK_PLUGIN_LDFLAGS@
tracing/libtraceevent/Makefile.am +4 -2
index d8bf05412c..b40f40c1d8 100644
@@ -1,9 +1,11 @@
-
 lib_LTLIBRARIES = libplugin_xenomai_schedparams.la
 
 libplugin_xenomai_schedparams_la_SOURCES =	\
 	plugin_xenomai_schedparams.c
 
 libplugin_xenomai_schedparams_la_CPPFLAGS =	\
-	-I$(TRACEEVENR_INCLUDS)			\
+	@XENO_LIBTRACEEVENT_PLUGIN_CFLAGS@	\
 	-I$(top_srcdir)/include
+
+libplugin_xenomai_schedparams_la_LDFLAGS =	\
+	@XENO_LIBTRACEEVENT_PLUGIN_LDFLAGS@
Signature · 2 lines
Siemens AG, Technology
Competence Center Embedded Linux
#4 lore raw

RE: [PATCH v4 3/3] libtraceevent: Add xenomai_schedparams plugin for libtraceevent

Quoted 8 lines

Review

Quoted 7 lines
(quoted diff) +7 -0
+
+  Please copy built libplugin_xenomai_schedparams.so to
+  /usr/local/lib/traceevent/plugins/ or
+  /usr/local/lib64/traceevent/plugins/ depending on your system.
+  While libtracevent and its plugins is installed correctly, the plugins
+  would be loaded automatically by other module such as libtracecmd after
+  corresponding tracing tool run such as kernelshark or tracecmd.
Quoted 5 lines

I should use the changes below to switch to pkg-config - that permits control over the installation path as well.

In addition, Xenomai should install the plugins properly, into the same folders as kernelshark and libtraceevent use.

Is that possible that it install just the plugin-ins when we execute make install after build but do not install Xenomai itself? Because Xenomai may install cross platform not local machine and they have different targets. Users may just want to install plugins into its host but do not want to touch its target Xenomai.

Regards

Hongzhan Chen

Quoted 3 lines

Jan

#5 lore raw

Re: [PATCH v4 3/3] libtraceevent: Add xenomai_schedparams plugin for libtraceevent

Quoted 8 lines · Hongzhan
Quoted 8 lines
Quoted 7 lines
(quoted diff) +7 -0
+
+  Please copy built libplugin_xenomai_schedparams.so to
+  /usr/local/lib/traceevent/plugins/ or
+  /usr/local/lib64/traceevent/plugins/ depending on your system.
+  While libtracevent and its plugins is installed correctly, the plugins
+  would be loaded automatically by other module such as libtracecmd after
+  corresponding tracing tool run such as kernelshark or tracecmd.
Quoted 8 lines
Quoted 5 lines

I should use the changes below to switch to pkg-config - that permits control over the installation path as well.

In addition, Xenomai should install the plugins properly, into the same folders as kernelshark and libtraceevent use.

Is that possible that it install just the plugin-ins when we execute make install after build but do not install Xenomai itself? Because Xenomai may install cross platform not local machine and they have different targets. Users may just want to install plugins into its host but do not want to touch its target Xenomai.

Multiple options:

- make -C tracing/... install
- DESTDIR=... make install; cp DESTDIR/usr/lib/kernelshark/... target-folder
- run packaging; apt install xenomai-kernelshark-plugin

BTW, installation already works, just not into the right folders.

Jan

Signature · 2 lines
Siemens AG, Technology
Competence Center Embedded Linux