All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christophe Bédard via lttng-dev" <lttng-dev@lists.lttng.org>
To: lttng-dev <lttng-dev@lists.lttng.org>
Subject: Correctly using callstack-user context
Date: Mon, 11 May 2020 17:09:40 -0400	[thread overview]
Message-ID: <CAAS9doY1Ez7N=_H6e-w9eWg0LBJp+MMasuOEmzbO0DGyLSzViA@mail.gmail.com> (raw)


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

Hi,

As part of a big software safety certification effort, we are looking into
making sure that some functions of our API do not allocate memory and do
not use any blocking syscalls.

This part is done and is working (using kmem_mm_page_{alloc,free} for
memory allocations for now). However, if we do get memory allocations, we
want to know where they're from. To do this, I've been looking at using the
callstack-user context. However, I have a hard time getting more than 1
callstack-user address.

I'm on 5.3.0-46-generic, i.e. CONFIG_ARCH_STACKWALK-compatible, from what I
could find. I tried creating a minimal version using
-fno-omit-frame-pointer & without any optimization, but I still get only
one address in the callstack_user context when I know there should be at
least a few.

Note that this is running inside a Docker container, but lttng-modules is
installed on the host, and a root session-daemon is running inside the
Docker container. Also, I installed LTTng using the stable-2.11 Ubuntu PPA.

Is there something I might be doing wrong? Am I supposed to compile
lttng-modules from source in order to use the callstack-* contexts? I
couldn't find much documentation about this, other than the brief mention
in the 2.11 docs.

Regards,


Christophe

[-- Attachment #1.2: Type: text/html, Size: 1494 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

WARNING: multiple messages have this Message-ID
From: "Christophe Bédard via lttng-dev" <lttng-dev@lists.lttng.org>
To: lttng-dev <lttng-dev@lists.lttng.org>
Subject: [lttng-dev] Correctly using callstack-user context
Date: Mon, 11 May 2020 17:09:40 -0400	[thread overview]
Message-ID: <CAAS9doY1Ez7N=_H6e-w9eWg0LBJp+MMasuOEmzbO0DGyLSzViA@mail.gmail.com> (raw)
Message-ID: <20200511210940.guXxCIlWd2FSb7uJkLLtaTC26Z6QkQz5IuGqOSer5fA@z> (raw)


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

Hi,

As part of a big software safety certification effort, we are looking into
making sure that some functions of our API do not allocate memory and do
not use any blocking syscalls.

This part is done and is working (using kmem_mm_page_{alloc,free} for
memory allocations for now). However, if we do get memory allocations, we
want to know where they're from. To do this, I've been looking at using the
callstack-user context. However, I have a hard time getting more than 1
callstack-user address.

I'm on 5.3.0-46-generic, i.e. CONFIG_ARCH_STACKWALK-compatible, from what I
could find. I tried creating a minimal version using
-fno-omit-frame-pointer & without any optimization, but I still get only
one address in the callstack_user context when I know there should be at
least a few.

Note that this is running inside a Docker container, but lttng-modules is
installed on the host, and a root session-daemon is running inside the
Docker container. Also, I installed LTTng using the stable-2.11 Ubuntu PPA.

Is there something I might be doing wrong? Am I supposed to compile
lttng-modules from source in order to use the callstack-* contexts? I
couldn't find much documentation about this, other than the brief mention
in the 2.11 docs.

Regards,


Christophe

[-- Attachment #1.2: Type: text/html, Size: 1494 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:[~2020-05-11 21:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 21:09 Christophe Bédard via lttng-dev [this message]
2020-05-11 21:09 ` [lttng-dev] " Christophe Bédard via lttng-dev
2020-05-12 12:27 ` Mathieu Desnoyers via lttng-dev
2020-05-12 12:27   ` [lttng-dev] " Mathieu Desnoyers via lttng-dev
2020-05-13 13:42   ` Christophe Bédard via lttng-dev
2020-05-13 13:42     ` [lttng-dev] " Christophe Bédard via lttng-dev
2020-05-13 14:02     ` Genevieve Bastien via lttng-dev
2020-05-13 14:02       ` [lttng-dev] " Genevieve Bastien via lttng-dev
2020-05-13 15:34       ` Christophe Bédard via lttng-dev
2020-05-13 15:34         ` [lttng-dev] " Christophe Bédard 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='CAAS9doY1Ez7N=_H6e-w9eWg0LBJp+MMasuOEmzbO0DGyLSzViA@mail.gmail.com' \
    --to=lttng-dev@lists.lttng.org \
    --cc=bedard.christophe@gmail.com \
    --subject='Re: Correctly using callstack-user context' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.