Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: yannick.brosseau@gmail.com (Yannick Brosseau)
Subject: [lttng-dev] Reading cache misses in Userspace?
Date: Mon, 07 Jan 2013 13:15:20 -0500	[thread overview]
Message-ID: <50EB10B8.80703@gmail.com> (raw)
In-Reply-To: <50E8834D.1010802@gmx.de>

On 2013-01-05 14:47, Alexander Kampmann wrote:
> hey,
>
> I would like to find out which part of my application causes most
> cache misses. So I tried to add userspace events to my application. I
> hoped LTTng would give me some mean of determining between which
> tracepoints the most cache misses occur.
>
> I started a session like that:
>
> sudo lttng create session
> sudo lttng enable-event -a -u
> sudo lttng add-context -u -t perf:LLC-load-misses -t
> perf:LLC-store-misses -t perf:LLC-prefetch-misses
>
> I get:
>
> Error: perf:LLC-prefetch-misses: UST invalid context
> Error: perf:LLC-store-misses: UST invalid context
> Error: perf:LLC-load-misses: UST invalid context
>
> Does this mean I can not add perf:LLC-* context to my userspace
> events? Is there any way to figure out which part of my application
> causes cache misses?
>
> If I use
>
> sudo lttng add-context -k -t perf:LLC-load-misses -t
> perf:LLC-store-misses -t perf:LLC-prefetch-misses
>
> instead, I don't get an error, but the babeltrace output does not
> contain any cache miss counts as well.

This context will be added to kernel events only, so you will need to
active some kernel event to see them.
sudo lttng enable-event -a -k would do the trick. You can also only
activate some events to reduce the size of the trace. The sched* events
and maybe the syscall would be interesting to place the perf counter to
some specific place of the application.

Yannick



  parent reply	other threads:[~2013-01-07 18:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-05 19:47 Alexander Kampmann
2013-01-07 13:47 ` Mathieu Desnoyers
2013-01-07 18:15 ` Yannick Brosseau [this message]
2013-01-07 19:10   ` Matthew Khouzam

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=50EB10B8.80703@gmail.com \
    --to=yannick.brosseau@gmail.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