lttng-dev Archive mirror
 help / color / mirror / Atom feed
From: Brian Hutchinson via lttng-dev <lttng-dev@lists.lttng.org>
To: "Yitschak, Yehuda" <yehuday@amazon.com>
Cc: "lttng-dev@lists.lttng.org" <lttng-dev@lists.lttng.org>
Subject: Re: [lttng-dev] Using lttng 2.11 and UST doesn't appear to work - getting empty trace files
Date: Tue, 25 Apr 2023 00:56:33 -0400	[thread overview]
Message-ID: <CAFZh4h_6zdF7uMF7EE6YgbEvvWWvc_4=uTderkwcUJVV8_mzvw@mail.gmail.com> (raw)
In-Reply-To: <9b162e6a547c41b284327034a9749027@amazon.com>


[-- Attachment #1.1: Type: text/plain, Size: 5258 bytes --]

So instructions for tracef just say to link in lttng-ust, not dl, I didn't
use liblttng-ust.a so maybe I misspoke.

https://lttng.org/docs/v2.11/#doc-tracef

... so that's what I did.

When I compile in a tracepoint with trace provider, I link in lttng-ust and
dl.  I'm assuming you can mix both tracef and tracepoint calls?

I included a lttng-sessiond -vvv log in original post.  Are attachments
allowed or should I have posted the context as a plain text post?  It's
quite big.

When I do lttng start, my app is already running via systemd at startup.
Do I need to disable that and start the executable manually after enabling
the lttng ust events?

Like I said, kernel trace is working fine, it's UST that appears to not be
working for some reason.  I have less experience with UST but I've been
researching and searching archives and I see others complaining about what
looks to be my problem but either don't see a solution or maybe I just
don't understand it.

Thanks,

Brian

On Tue, Apr 25, 2023 at 12:13 AM Yitschak, Yehuda <yehuday@amazon.com>
wrote:

> It might be related to the static linking of lttng-ust
> https://lists.lttng.org/pipermail/lttng-dev/2018-January/027705.html
>
> I also went down that path just to figure it’s not supported.
>
> Perhaps lttng documentation should be updated to make a clear note static
> linking is not supported (or maybe I missed it)
>
> Yehuda
>
> Hi,
>
>
>
> I'm on an embedded platform, i.MX8 using Lttng 2.11 with 5.6.69 kernel.
>
>
>
> Tracing kernel events with lttng works fine but userspace (tracef and
> trace provider type tracing) appears to have an issue I can't figure out.
>
>
>
> systemd is starting up my application ( a bunch of processes and threads
> on multiple cpu's) on boot.
>
>
>
> I'm statically compiling and linking in lttng-ust.  If I use just tracef
> type tracing, when I do lttng list --userspace I get nothing.  If I add in
> a trace provider and a tracepoint, then I see my trace provider tracepoint
> and:
>
>
>
>      lttng_ust_tracelog:TRACE_DEBUG (loglevel: TRACE_DEBUG (14)) (type:
> tracepoint)
>      lttng_ust_tracelog:TRACE_DEBUG_LINE (loglevel: TRACE_DEBUG_LINE (13))
> (type: tracepoint)
>      lttng_ust_tracelog:TRACE_DEBUG_FUNCTION (loglevel:
> TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
>      lttng_ust_tracelog:TRACE_DEBUG_UNIT (loglevel: TRACE_DEBUG_UNIT (11))
> (type: tracepoint)
>      lttng_ust_tracelog:TRACE_DEBUG_MODULE (loglevel: TRACE_DEBUG_MODULE
> (10)) (type: tracepoint)
>      lttng_ust_tracelog:TRACE_DEBUG_PROCESS (loglevel: TRACE_DEBUG_PROCESS
> (9)) (type: tracepoint)
>      lttng_ust_tracelog:TRACE_DEBUG_PROGRAM (loglevel: TRACE_DEBUG_PROGRAM
> (8)) (type: tracepoint)
>      lttng_ust_tracelog:TRACE_DEBUG_SYSTEM (loglevel: TRACE_DEBUG_SYSTEM
> (7)) (type: tracepoint)
>      lttng_ust_tracelog:TRACE_INFO (loglevel: TRACE_INFO (6)) (type:
> tracepoint)
>      lttng_ust_tracelog:TRACE_NOTICE (loglevel: TRACE_NOTICE (5)) (type:
> tracepoint)
>      lttng_ust_tracelog:TRACE_WARNING (loglevel: TRACE_WARNING (4)) (type:
> tracepoint)
>      lttng_ust_tracelog:TRACE_ERR (loglevel: TRACE_ERR (3)) (type:
> tracepoint)
>      lttng_ust_tracelog:TRACE_CRIT (loglevel: TRACE_CRIT (2)) (type:
> tracepoint)
>      lttng_ust_tracelog:TRACE_ALERT (loglevel: TRACE_ALERT (1)) (type:
> tracepoint)
>      lttng_ust_tracelog:TRACE_EMERG (loglevel: TRACE_EMERG (0)) (type:
> tracepoint)
>      lttng_ust_tracef:event (loglevel: TRACE_DEBUG (14)) (type:
> tracepoint)
>      lttng_ust_lib:unload (loglevel: TRACE_DEBUG_LINE (13)) (type:
> tracepoint)
>      lttng_ust_lib:debug_link (loglevel: TRACE_DEBUG_LINE (13)) (type:
> tracepoint)
>      lttng_ust_lib:build_id (loglevel: TRACE_DEBUG_LINE (13)) (type:
> tracepoint)
>      lttng_ust_lib:load (loglevel: TRACE_DEBUG_LINE (13)) (type:
> tracepoint)
>      lttng_ust_statedump:end (loglevel: TRACE_DEBUG_LINE (13)) (type:
> tracepoint)
>      lttng_ust_statedump:debug_link (loglevel: TRACE_DEBUG_LINE (13))
> (type: tracepoint)
>      lttng_ust_statedump:build_id (loglevel: TRACE_DEBUG_LINE (13)) (type:
> tracepoint)
>      lttng_ust_statedump:bin_info (loglevel: TRACE_DEBUG_LINE (13)) (type:
> tracepoint)
>      lttng_ust_statedump:start (loglevel: TRACE_DEBUG_LINE (13)) (type:
> tracepoint)
>
>
>
> When I do lttng start, I get a directory structure in the trace directory
> but the file sizes do not ever increase.  It's just a directory structure
> with files created and then that's it, no events being written to the
> files.  At first I thought things just weren't linked in right and not
> working but then discovered how to run lttng-sessiond in -vvv mode and then
> could see lots of things are going on, tracing appears to be trying to work
> as there is tons of activity being output by lttng-sessiond, but like I
> said the trace files aren't being added to.
>
>
>
> I looked at the lttng-sessiond log I captured and can't quite make out the
> problem so attaching it.
>
>
>
> I'm probably not doing something right but can't figure out what that is
> so any pointers appreciated.
>
>
>
> Regards,
>
>
>
> Brian
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 8139 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

  reply	other threads:[~2023-04-25  4:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25  4:13 [lttng-dev] Using lttng 2.11 and UST doesn't appear to work - getting empty trace files Yitschak, Yehuda via lttng-dev
2023-04-25  4:56 ` Brian Hutchinson via lttng-dev [this message]
2023-04-25 12:30   ` Brian Hutchinson via lttng-dev
  -- strict thread matches above, loose matches on Subject: below --
2023-04-24 13:48 Brian Hutchinson via lttng-dev

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='CAFZh4h_6zdF7uMF7EE6YgbEvvWWvc_4=uTderkwcUJVV8_mzvw@mail.gmail.com' \
    --to=lttng-dev@lists.lttng.org \
    --cc=b.hutchman@gmail.com \
    --cc=yehuday@amazon.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).