Re: [lttng-dev] tracing page_faults with lttng?
Le sam. 2 nov. 2019, à 11 h 41, Milian Wolff via lttng-dev a écrit : > > On Samstag, 12. Oktober 2019 23:31:51 CET Milian Wolff via lttng-dev wrote: > > On Montag, 29. Mai 2017 10:44:50 CEST Milian Wolff wrote: > > > On Wednesday, May 24, 2017 6:26:38 PM CEST Francis Deslauriers wrote: > > > > Hi Milian, > > > > Are you running on an x86 processor? > > > > > > Yes, Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz. > > > > > > > The pagefault tracepoints are called : x86_exceptions_page_fault_user, > > > > x86_exceptions_page_fault_kernel > > > > Can you see those tracepoints when you run: lttng list --kernel > > > > > > Yes: > > > > > > $ lttng list --kernel | grep fault > > > > > > x86_exceptions_page_fault_user (loglevel: TRACE_EMERG (0)) (type: > > > tracepoint) > > > > > > x86_exceptions_page_fault_kernel (loglevel: TRACE_EMERG (0)) (type: > > > tracepoint) > > > > > > kvm_async_pf_doublefault (loglevel: TRACE_EMERG (0)) (type: > > > tracepoint) > > > > Hey there, > > > > a follow up to the above question: What about tracing page faults on ARM? > > Perf can do that, but I see no page_fault trace points in the output of > > `lttng list -k`? > > ping? Hi Milian, I believe that the page fault event you see with Perf is a perf event, not a trace event. What is the name of the event you see exactly? In order to trace the page faults on Arm with LTTng, we will need to add trace event tracepoints to the do_page_fault() functions in the arm (or arm64) architecture of the kernel. Francis > > -- > Milian Wolff | milian.wo...@kdab.com | Senior Software Engineer > KDAB (Deutschland) GmbH, a KDAB Group company > Tel: +49-30-521325470 > KDAB - The Qt, C++ and OpenGL > Experts___ > lttng-dev mailing list > lttng-dev@lists.lttng.org > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -- Francis Deslauriers Computer Engineer EfficiOS inc. ___ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [lttng-dev] 回复:Re: 回复:Re: 回复:Re: Pros and Cons of LTTng
Hi, On Mon, Nov 04, 2019 at 11:47:58AM +0800, 杨海 wrote: > Hi > > > As you previously commented, “The current LTTng kernel tracer (lttng-modules) > supports Linux 3.0+ only.” and we can find the support package list on > http://packages.efficios.com/. ; > Does LTTng have roadmap for upcoming new kernel versions? I presume you are explicitly asking for RHEL & SUSE kernels. The current packages for these distro are maintained on a best effort and commercial incentive of EfficiOS. If you are interested in supporting this effort please contact sa...@efficios.com. As for the actual upstream kernel, we are monitoring [1] all new kernels and stable branches. [1] https://ci.lttng.org/view/LTTng-modules/ https://ci.lttng.org/view/LTTng-modules/job/lttng-modules_stable-2.9_build-vanilla/ https://ci.lttng.org/view/LTTng-modules/job/lttng-modules_stable-2.10_build-vanilla/ https://ci.lttng.org/view/LTTng-modules/job/lttng-modules_stable-2.11_build-vanilla/ https://ci.lttng.org/view/LTTng-modules/job/lttng-modules_master_build-vanilla/ Cheers ___ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [lttng-dev] [PATCH lttng-tools] fix: check for dtrace and sdt.h before enabling SDT uprobe tests
Merged in master and stable-2.11. Thanks! Jérémie On Thu, Oct 31, 2019 at 04:12:46PM -0400, Michael Jeanson wrote: > Add a configure switch '--enable-sdt-uprobe / --disable-sdt-uprobe', the > default behavior of enabling the test if the requirements are found is > kept but it's now possible to explicitly disable it. > > Also add the detection of the dtrace binary and its override trough the > DTRACE environment variable. > > Signed-off-by: Michael Jeanson > --- > configure.ac | 37 +-- > tests/utils/testapp/Makefile.am | 4 +- > .../userspace-probe-sdt-binary/Makefile.am| 8 +++- > 3 files changed, 42 insertions(+), 7 deletions(-) > > diff --git a/configure.ac b/configure.ac > index 8c0683fe2..ab0a15b2d 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -25,9 +25,6 @@ AC_PROG_CXX > RW_PROG_CXX_WORKS > AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"]) > > -LTTNG_CHECK_SDT_WORKS > -AM_CONDITIONAL([SDT_WORKS], [test "x$lttng_cv_sdt_works" = "xyes"]) > - > # Checks for programs. > AC_PROG_GREP > AC_PROG_MAKE_SET > @@ -815,6 +812,36 @@ AC_SUBST([RUN_PYTHON_AGENT_TEST]) > AC_SUBST([PYTHON2_AGENT]) > AC_SUBST([PYTHON3_AGENT]) > > +AC_ARG_ENABLE([test-sdt-uprobe], > + [AS_HELP_STRING([--enable-test-sdt-uprobe], [enable the LTTng UST SDT > uprobe tests [default=autodetect]])], > + [test_sdt_uprobe="$enableval"], > + [test_sdt_uprobe=autodetect] > +) > + > +AS_IF([test "$test_sdt_uprobe" != "no"], [ > + LTTNG_CHECK_SDT_WORKS > + AC_PATH_PROG([DTRACE], [dtrace]) > +]) > + > +AS_IF([test "$test_sdt_uprobe" = "yes"], [ > + AS_IF([test "$lttng_cv_sdt_works" = "no"], [ > +AC_MSG_ERROR([Cannot find 'sys/sdt.h'.]) > + ]) > + AS_IF([test "x$DTRACE" = "x"], [ > +AC_MSG_ERROR([Cannot find SystemTap dtrace. You can set the DTRACE > variable to override automatic detection.]) > + ]) > +]) > + > +AS_IF([test "$test_sdt_uprobe" = "autodetect"], [ > + AS_IF([test "$lttng_cv_sdt_works" = "yes"], [ > +AS_IF([test "x$DTRACE" != "x"], [ > + test_sdt_uprobe=yes > +]) > + ]) > +]) > + > +AM_CONDITIONAL([TEST_SDT_UPROBE], [test "$test_sdt_uprobe" = "yes"]) > + > # Arguments for binaries build exclusion > AC_ARG_ENABLE([bin-lttng], AS_HELP_STRING([--disable-bin-lttng],[Disable the > build of lttng binaries])) > AC_ARG_ENABLE([bin-lttng-consumerd], > AS_HELP_STRING([--disable-bin-lttng-consumerd], > @@ -1243,6 +1270,10 @@ PPRINT_PROP_BOOL([LTTng-UST Python2 agent tests], > $value) > test ! -z "$PYTHON3_AGENT" && value=1 || value=0 > PPRINT_PROP_BOOL([LTTng-UST Python3 agent tests], $value) > > +# LTTng UST Java agent Log4j tests enabled/disabled > +test "x$test_sdt_uprobe" = "xyes" && value=1 || value=0 > +PPRINT_PROP_BOOL([LTTng-UST SDT uprobe tests], $value) > + > #Python binding enabled/disabled > test "x$enable_python_binding" = xyes && value=1 || value=0 > AS_ECHO > diff --git a/tests/utils/testapp/Makefile.am b/tests/utils/testapp/Makefile.am > index 2a4cf5c7b..e2ad1f235 100644 > --- a/tests/utils/testapp/Makefile.am > +++ b/tests/utils/testapp/Makefile.am > @@ -12,9 +12,9 @@ if CXX_WORKS > SUBDIRS += userspace-probe-elf-cxx-binary > endif # CXX_WORKS > > -if SDT_WORKS > +if TEST_SDT_UPROBE > SUBDIRS += userspace-probe-sdt-binary > -endif # SDT_WORKS > +endif # TEST_SDT_UPROBE > > if HAVE_MODULES_USERSPACE_CALLSTACK_CONTEXT > SUBDIRS += gen-syscall-events-callstack > diff --git a/tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am > b/tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am > index d79ce0ea3..591f4aa6c 100644 > --- a/tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am > +++ b/tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am > @@ -26,10 +26,14 @@ libzzz_la_CFLAGS = -I$(abs_builddir) > libzzz_la_LDFLAGS = -module -shared -avoid-version -rpath > $(abs_builddir)/.libs/ > nodist_libzzz_la_SOURCES = $(abs_builddir)/foobar_provider.h > > +dtrace_verbose = $(dtrace_verbose_@AM_V@) > +dtrace_verbose_ = $(dtrace_verbose_@AM_DEFAULT_V@) > +dtrace_verbose_0 = @echo " DTRACE " $@; > + > foobar_provider.h: foobar_provider.d > - dtrace -s $< -o $@ -h > + $(dtrace_verbose)$(DTRACE) -s $< -o $@ -h > > foobar_provider.o: foobar_provider.d > - dtrace -s $< -o $@ -G > + $(dtrace_verbose)$(DTRACE) -s $< -o $@ -G > > CLEANFILES = foobar_provider.h > -- > 2.17.1 > ___ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [lttng-dev] [PATCH lttng-tools] Use pkgconfig to detect and configure liblttng-ust
Merged in master. Thanks! Jérémie On Thu, Oct 24, 2019 at 11:36:22AM -0400, Michael Jeanson wrote: > Signed-off-by: Michael Jeanson > --- > configure.ac | 25 +-- > src/bin/lttng-consumerd/Makefile.am | 2 +- > src/bin/lttng-sessiond/Makefile.am| 2 +- > src/common/ust-consumer/Makefile.am | 2 +- > tests/regression/tools/filtering/Makefile.am | 2 +- > .../ust/baddr-statedump/Makefile.am | 2 +- > tests/regression/ust/daemon/Makefile.am | 2 +- > tests/regression/ust/exit-fast/Makefile.am| 2 +- > tests/regression/ust/fork/Makefile.am | 4 +-- > .../ust/high-throughput/Makefile.am | 2 +- > tests/regression/ust/libc-wrapper/Makefile.am | 2 +- > tests/regression/ust/linking/Makefile.am | 10 > .../regression/ust/low-throughput/Makefile.am | 2 +- > tests/regression/ust/multi-lib/Makefile.am| 6 ++--- > .../regression/ust/multi-session/Makefile.am | 2 +- > tests/regression/ust/overlap/demo/Makefile.am | 4 +-- > .../ust/type-declarations/Makefile.am | 3 ++- > tests/unit/Makefile.am| 4 +-- > .../testapp/gen-ust-events-ns/Makefile.am | 2 +- > .../utils/testapp/gen-ust-events/Makefile.am | 2 +- > .../testapp/gen-ust-nevents-str/Makefile.am | 2 +- > .../utils/testapp/gen-ust-nevents/Makefile.am | 2 +- > .../utils/testapp/gen-ust-tracef/Makefile.am | 2 +- > 23 files changed, 44 insertions(+), 44 deletions(-) > > diff --git a/configure.ac b/configure.ac > index e57f53631..dd708883b 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -560,19 +560,18 @@ AC_ARG_WITH([lttng-ust], >[with_lttng_ust=yes] > ) > > -AS_IF([test "x$with_lttng_ust" = "xyes"], > - [ > -AC_CHECK_LIB([lttng-ust-ctl], [ustctl_recv_channel_from_consumer], > - [ > -AC_DEFINE([HAVE_LIBLTTNG_UST_CTL], [1]) > - ], > - [ > -AC_MSG_FAILURE([Cannot find LTTng-UST >= 2.2.x. Use [LDFLAGS]=-Ldir > and [CPPFLAGS]=-Idir to specify its location, or specify --without-lttng-ust > to build lttng-tools without LTTng-UST support.]) > - ], > - [-lurcu-common -lurcu-bp -lurcu-cds -lrt -ldl] > -) > - ] > -) > +AS_IF([test "x$with_lttng_ust" = "xyes"], [ > + AC_DEFINE([HAVE_LIBLTTNG_UST_CTL], [1]) > + > + # Check for liblttng-ust > + PKG_CHECK_MODULES([UST], [lttng-ust >= $major_version.$minor_version]) > + > + # Check for liblttng-ust-ctl > + PKG_CHECK_MODULES([UST_CTL], [lttng-ust-ctl >= > $major_version.$minor_version]) > + > + AM_CPPFLAGS="$AM_CPPFLAGS $UST_CFLAGS" > +]) > + > AM_CONDITIONAL([HAVE_LIBLTTNG_UST_CTL], [test "x$with_lttng_ust" = "xyes"]) > > > diff --git a/src/bin/lttng-consumerd/Makefile.am > b/src/bin/lttng-consumerd/Makefile.am > index 9d54309cf..0659a34a0 100644 > --- a/src/bin/lttng-consumerd/Makefile.am > +++ b/src/bin/lttng-consumerd/Makefile.am > @@ -16,5 +16,5 @@ lttng_consumerd_LDADD = \ > lttng_consumerd_LDFLAGS = -rdynamic > > if HAVE_LIBLTTNG_UST_CTL > -lttng_consumerd_LDADD += -llttng-ust-ctl > +lttng_consumerd_LDADD += $(UST_CTL_LIBS) > endif > diff --git a/src/bin/lttng-sessiond/Makefile.am > b/src/bin/lttng-sessiond/Makefile.am > index 296ec148b..ebb8cb284 100644 > --- a/src/bin/lttng-sessiond/Makefile.am > +++ b/src/bin/lttng-sessiond/Makefile.am > @@ -78,5 +78,5 @@ lttng_sessiond_LDADD = -lurcu-common -lurcu $(KMOD_LIBS) \ > > > if HAVE_LIBLTTNG_UST_CTL > -lttng_sessiond_LDADD += -llttng-ust-ctl > +lttng_sessiond_LDADD += $(UST_CTL_LIBS) > endif > diff --git a/src/common/ust-consumer/Makefile.am > b/src/common/ust-consumer/Makefile.am > index 1acdc7f12..1df8b53c0 100644 > --- a/src/common/ust-consumer/Makefile.am > +++ b/src/common/ust-consumer/Makefile.am > @@ -5,7 +5,7 @@ noinst_LTLIBRARIES = libust-consumer.la > libust_consumer_la_SOURCES = ust-consumer.c ust-consumer.h > > libust_consumer_la_LIBADD = \ > - -llttng-ust-ctl \ > + $(UST_CTL_LIBS) \ > $(top_builddir)/src/common/relayd/librelayd.la > > endif > diff --git a/tests/regression/tools/filtering/Makefile.am > b/tests/regression/tools/filtering/Makefile.am > index b214fc1d6..5900a2093 100644 > --- a/tests/regression/tools/filtering/Makefile.am > +++ b/tests/regression/tools/filtering/Makefile.am > @@ -3,7 +3,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/tests -I$(srcdir) > if HAVE_LIBLTTNG_UST_CTL > noinst_PROGRAMS = gen-ust-events > gen_ust_events_SOURCES = gen-ust-events.c tp.c tp.h > -gen_ust_events_LDADD = -llttng-ust -lurcu-bp $(DL_LIBS) > +gen_ust_events_LDADD = $(UST_LIBS) $(DL_LIBS) > endif > > noinst_SCRIPTS = test_unsupported_op test_invalid_filter test_valid_filter > diff --git a/tests/regression/ust/baddr-statedump/Makefile.am > b/tests/regression/ust/baddr-statedump/Makefile.am > index bf51f9483..253c9029f 100644 > --- a/tests/regression/ust/baddr-statedump/Makefile.am > +++ b/tests/regression/ust/
Re: [lttng-dev] [PATCH lttng-tools] Fix: initialize sessions pointer to NULL
Merged in master, stable-2.11, and stable-2.10. Thanks! Jérémie On Fri, Oct 25, 2019 at 05:56:26PM -0400, Jonathan Rajotte wrote: > lttng_list_sessions does not set the passed pointer to NULL on empty > return. This lead to deallocation of non-allocated memory (segfault). > > For returns of size 0, the value of the passed argument should be > considered "undefined". > > Refactor error handling a bit by removing the "error" jump. Always call > free on the sessions object. > > Fixes #1205 > > Signed-off-by: Jonathan Rajotte > --- > src/bin/lttng/commands/list.c | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c > index 28166c8be..65d8ea6f5 100644 > --- a/src/bin/lttng/commands/list.c > +++ b/src/bin/lttng/commands/list.c > @@ -1825,7 +1825,7 @@ static int list_sessions(const char *session_name) > int ret = CMD_SUCCESS; > int count, i; > unsigned int session_found = 0; > - struct lttng_session *sessions; > + struct lttng_session *sessions = NULL; > > count = lttng_list_sessions(&sessions); > DBG("Session count %d", count); > @@ -1838,7 +1838,7 @@ static int list_sessions(const char *session_name) > if (lttng_opt_mi) { > /* Mi */ > if (session_name == NULL) { > - /* List all session */ > + /* List all sessions */ > ret = mi_list_sessions(sessions, count); > } else { > /* Note : this return an open session element */ > @@ -1846,7 +1846,7 @@ static int list_sessions(const char *session_name) > } > if (ret) { > ret = CMD_ERROR; > - goto error; > + goto end; > } > } else { > /* Pretty print */ > @@ -1893,7 +1893,7 @@ static int list_sessions(const char *session_name) > if (!session_found && session_name != NULL) { > ERR("Session '%s' not found", session_name); > ret = CMD_ERROR; > - goto error; > + goto end; > } > > if (session_name == NULL) { > @@ -1901,9 +1901,8 @@ static int list_sessions(const char *session_name) > } > } > > -error: > - free(sessions); > end: > + free(sessions); > return ret; > } > > -- > 2.17.1 > ___ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [lttng-dev] [PATCH lttng-tools] fix: Use DL_LIBS variable in ust multi-lib test
Merged in master. Thanks! Jérémie On Thu, Oct 24, 2019 at 11:36:33AM -0400, Michael Jeanson wrote: > Signed-off-by: Michael Jeanson > --- > tests/regression/ust/multi-lib/Makefile.am | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tests/regression/ust/multi-lib/Makefile.am > b/tests/regression/ust/multi-lib/Makefile.am > index 0ce46a7ff..52a1635c2 100644 > --- a/tests/regression/ust/multi-lib/Makefile.am > +++ b/tests/regression/ust/multi-lib/Makefile.am > @@ -3,11 +3,11 @@ EXTRA_DIST = test_multi_lib > noinst_PROGRAMS = exec-with-callsites exec-without-callsites > > exec_with_callsites_SOURCES = multi-lib-test.c callsites.c > -exec_with_callsites_LDFLAGS = -ldl $(POPT_LIBS) > +exec_with_callsites_LDFLAGS = $(DL_LIBS) $(POPT_LIBS) > exec_with_callsites_CFLAGS = $(POPT_CFLAGS) $(AM_CFLAGS) -DHAS_CALLSITES=1 > > exec_without_callsites_SOURCES = multi-lib-test.c > -exec_without_callsites_LDFLAGS = -ldl $(POPT_LIBS) $(UST_LIBS) > +exec_without_callsites_LDFLAGS = $(DL_LIBS) $(POPT_LIBS) $(UST_LIBS) > exec_without_callsites_LDADD = probes.o > exec_without_callsites_CFLAGS = $(POPT_CFLAGS) $(AM_CFLAGS) -DHAS_CALLSITES=0 > > -- > 2.17.1 > ___ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev