lttng


Events not traced with Dynamic loading


I'm using the sample C application supplied in the docs of lttng with identical files.
http://lttng.org/docs/#doc-tracing-your-own-user-application
i create my shared library as stated in the docs.
gcc -shared -W1,--no-as-needed -o hello-tp.so -llttng-ust hello-tp.o
gcc -o hello hello.c hello-tp.o -ldl
hello-tp.so is created in the same folder as the application hello. So I run
LD_PRELOAD=./hello-tp.so ./hello and beyond
I check that the event is available
PID: 13120 - Name: ./hello
ust_baddr_statedump:soinfo (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)
and as expected it was loaded correctly.
I enable all events to be traced. I run my application and start tracing. I then stop and use 'lttng view' to see the trace.
But my trace file is empty.
Is there a reason that none of the events are being traced even though I have enabled it?
Thanks for any help.
I had to move
#define TRACEPOINT_DEFINE
#define TRACEPOINT_PROBE_DYNAMIC_LINKAGE
#include "hello-tp.h" //the header file containing the event
into my hello.c
But didn't know i had to keep
#define TRACEPOINT_CREATE_PROBES
inside my hello-tp.c so when i linked against hello-tp.o it registered the event but never traced anything. And so the hello-tp.so wouldn't have worked. This resource helped me a bunch.
https://github.com/giraldeau/lttng-ust/tree/master/doc/examples/demo

Related Links

Issues with installation LTTNG for fedora22
How to enable lttng_statedump events?
How can I record a memory address with lttng?
No lttng save/load command available
How can we make babeltrace survive the restart of the node and resume after restart
Events not traced with Dynamic loading
Post Processing LTTNG (CTF) Trace Data
Trace loss in LTTng
Unable to view LTTNG profile from ARM on Eclipse Trace
LTTng and Babeltrace python bindings never enabled
How can I collect performance data similar as pidstat using lttng?
Descriptions of lttng kernel events

Categories

HOME
ibm-bluemix
date
blogger
gerrit
netsuite
omnet++
push-notification
google-play
plot
homebrew
iot
mean-stack
jsp-tags
setup-deployment
programming-languages
google-oauth
jpeg
fsm
google-project-tango
retrofit
acquia
cross-validation
dax
floating-action-button
mapserver
quickbooks
windows-azure-storage
carthage
percona
pythonanywhere
nodatime
introduction
custom-wordpress-pages
orleans
web-sql
icloud-api
opennlp
sparse-matrix
centos6.5
strncpy
elasticsearch-ruby
jaxb2
libssl
delicious-api
nat
skia
react-chartjs
junit5
key-value-observing
functor
airconsole
calibre
rotational-matrices
restlet
ssjs
email-templates
pango
logparser
worksheet
pnotify
sage-one
brightcove
setter
nodebb
nbconvert
hittest
quartz-composer
firmata
passport-google-oauth
dstu2-fhir
merge-conflict-resolution
jwplayer7
captivenetwork
apachebench
energy
phpcas
natvis
riak-cs
interrupted-exception
event-bubbling
fluid-dynamics
modalpopup
codeigniter-url
client-side-templating
markers
heisenbug
ms-project-server-2010
random-seed
factory-method
hgsubversion
nsdatecomponents
gnustep
xmemcached
table-footer
winbugs14
telerik-scheduler
sudzc
backcolor
ti-dsp
virtual-functions
swing-app-framework
privilege
procedural-music
genealogy
w3wp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App