Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: cpthk@hotmail.com (Jeffrey Chen)
Subject: [lttng-dev] LTTng c++ loglevel not being set
Date: Wed, 24 Jun 2015 18:42:20 -0700	[thread overview]
Message-ID: <BLU169-W5812986F014E6A9F9F766AABAE0@phx.gbl> (raw)

I noticed a macro issue with LTTng under C++. The TRACEPOINT_LOGLEVEL would be ignored.

Here are my steps to repro the issue. My .tp file has the TRACEPOINT_LOGLEVEL macro set.
1. I generated the hello-tp.c file from the hello-tp.tp file using the lttng-gen-tp tool.
2. I renamed the generated .c file into .cpp and compiled with `g++ -c -I. hello-tp.cpp`
3. I wrote my c++ code called and call tracepoint macro, saved to hello.cpp, compiled with `g++ -c -I. hello.cpp`
4. I compile to an executable with `g++ -o hello hello.o hello-tp.o -llttng-ust -ldl`
5. I run the executable, and noticed the loglevel I set in the .tp file is not working. All the traces are still being written as default loglevel TRACE_DEBUG_LINE.

I tried confirming it by using `lttng list --userspace` command and I see "hello_world:my_first_tracepoint (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)"
You could see the loglevel was not set.

I tried the same steps without renaming to cpp files and build with `gcc` command and it works fine. I also tried without renaming to cpp files but compiled with `g++` command, but it also does not work. It seems to have something to do with c++ name mangling. Anyone noticed this issue? Thanks.
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20150624/b5e0e989/attachment.html>


             reply	other threads:[~2015-06-25  1:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25  1:42 Jeffrey Chen [this message]
2015-06-25  5:55 ` Zifei Tong

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=BLU169-W5812986F014E6A9F9F766AABAE0@phx.gbl \
    --to=cpthk@hotmail.com \
    /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