From: Brian Hutchinson via lttng-dev <lttng-dev@lists.lttng.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: lttng-dev@lists.lttng.org
Subject: Re: [lttng-dev] Trying to understand use of lttng enable-event --kernel --userspace-probe=
Date: Thu, 18 May 2023 15:28:38 -0400 [thread overview]
Message-ID: <CAFZh4h9VjVVtQ_0O2eU=BD171oi=yGEnDvmXky3LRPw3vb0OmA@mail.gmail.com> (raw)
In-Reply-To: <ce391c2f-4aae-413f-bcf3-4f3356499f34@efficios.com>
On Thu, May 18, 2023 at 3:16 PM Mathieu Desnoyers
<mathieu.desnoyers@efficios.com> wrote:
>
> On 2023-05-18 15:07, Brian Hutchinson wrote:
>
> [...]
>
> >>
> >> If you attach to an ELF symbol (function), then there is no USDT in
> >> play, so it should not be related to the issue you have.
> >
> > That is what I was thinking which is why I wanted to try it.
> >
> >>
> >> But if your functions happen to be inlined, then there will be nothing
> >> to attach to. Perhaps this is what happens there ?
> >
> > I don't see any evidence of anything being inlined in this module. I
> > grepped the code to verify.
> >
> > Back to being stumped/stuck.
>
> Make sure to check the resulting assembler and ELF symbol tables.
>
> The compiler is free to inline various functions unless they are
> explicitly marked as __attribute__((noinline)). Also, if LTO is enabled,
I could put that in the code just to make sure. It's a big function
so doubt it but I'll try anything at this point ha, ha.
I wondered if optimization could be doing it.
I can provide the standard yocto environment script that's being
source that was generated for the sdk:
$ cat environment-setup-aarch64-poky-linux
# Check for LD_LIBRARY_PATH being set, which can break SDK and
generally is a bad practice
# http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80
# http://xahlee.info/UnixResource_dir/_/ldpath.html
# Only disable this check if you are absolutely know what you are doing!
if [ ! -z "${LD_LIBRARY_PATH:-}" ]; then
echo "Your environment is misconfigured, you probably need to
'unset LD_LIBRARY_PATH'"
echo "but please check why this was set in the first place and that
it's safe to unset."
echo "The SDK will not operate correctly in most cases when
LD_LIBRARY_PATH is set."
echo "For more references see:"
echo " http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80"
echo " http://xahlee.info/UnixResource_dir/_/ldpath.html"
return 1
fi
export SDKTARGETSYSROOT=/opt/poky/3.1.24/sysroots/aarch64-poky-linux
export PATH=/opt/poky/3.1.24/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky/3.1.24/sysroots/x86_64-pokysdk-linux/usr/sbin:/opt/poky/3.1.24/sysroots/x86_64-pokysdk-linux/bin:/opt/poky/3.1.24/sysroots/x86_64-pokysdk-linux/sbin:/opt/poky/3.1.24/sysroots/x86_64-pokysdk-linux/usr/
bin/../x86_64-pokysdk-linux/bin:/opt/poky/3.1.24/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux:/opt/poky/3.1.24/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux-musl:"$PATH"
export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT
export PKG_CONFIG_PATH=$SDKTARGETSYSROOT/usr/lib/pkgconfig:$SDKTARGETSYSROOT/usr/share/pkgconfig
export CONFIG_SITE=/opt/poky/3.1.24/site-config-aarch64-poky-linux
export OECORE_NATIVE_SYSROOT="/opt/poky/3.1.24/sysroots/x86_64-pokysdk-linux"
export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"
export OECORE_ACLOCAL_OPTS="-I
/opt/poky/3.1.24/sysroots/x86_64-pokysdk-linux/usr/share/aclocal"
export OECORE_BASELIB="lib"
export OECORE_TARGET_ARCH="aarch64"
export OECORE_TARGET_OS="linux"
unset command_not_found_handle
export CC="aarch64-poky-linux-gcc -mcpu=cortex-a53+crc+crypto
-fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat
-Wformat-security -Werror=format-security --sysroot=$SDKTARGETSYSROOT"
export CXX="aarch64-poky-linux-g++ -mcpu=cortex-a53+crc+crypto
-fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat
-Wformat-security -Werror=format-security --sysroot=$SDKTARGETSYSROOT"
export CPP="aarch64-poky-linux-gcc -E -mcpu=cortex-a53+crc+crypto
-fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat
-Wformat-security -Werror=format-security --sysroot=$SDKTARGETSYSROOT"
export AS="aarch64-poky-linux-as "
export LD="aarch64-poky-linux-ld --sysroot=$SDKTARGETSYSROOT"
export GDB=aarch64-poky-linux-gdb
export STRIP=aarch64-poky-linux-strip
export RANLIB=aarch64-poky-linux-ranlib
export OBJCOPY=aarch64-poky-linux-objcopy
export OBJDUMP=aarch64-poky-linux-objdump
export READELF=aarch64-poky-linux-readelf
export AR=aarch64-poky-linux-ar
export NM=aarch64-poky-linux-nm
export M4=m4
export TARGET_PREFIX=aarch64-poky-linux-
export CONFIGURE_FLAGS="--target=aarch64-poky-linux
--host=aarch64-poky-linux --build=x86_64-linux
--with-libtool-sysroot=$SDKTARGETSYSROOT"
export CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types "
export CXXFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types "
export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
-fstack-protector-strong -Wl,-z,relro,-z,now"
export CPPFLAGS=""
export KCFLAGS="--sysroot=$SDKTARGETSYSROOT"
export OECORE_DISTRO_VERSION="3.1.24"
export OECORE_SDK_VERSION="3.1.24"
export ARCH=arm64
export CROSS_COMPILE=aarch64-poky-linux-
# Append environment subscripts
if [ -d "$OECORE_TARGET_SYSROOT/environment-setup.d" ]; then
for envfile in $OECORE_TARGET_SYSROOT/environment-setup.d/*.sh; do
. $envfile
done
fi
if [ -d "$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then
for envfile in $OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do
. $envfile
done
fi
> further optimization can be done at link-time.
>
> One purpose of the UST tracepoints is to be less fragile with respect to
> specific optimizations done by the compiler and linker, thus
> guaranteeing that whatever is instrumented with a tracepoint is indeed
> available for tracing.
>
> Also, double-check that the path you pass to --userspace-probe really
> targets your executable or .so binary file, and is not just a symbolic link.
It is full path.
>
> Thanks,
>
> Mathieu
>
> --
> Mathieu Desnoyers
> EfficiOS Inc.
> https://www.efficios.com
>
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
next prev parent reply other threads:[~2023-05-18 19:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-17 2:11 Brian Hutchinson via lttng-dev
2023-05-17 16:08 ` Mathieu Desnoyers via lttng-dev
2023-05-17 16:37 ` Brian Hutchinson via lttng-dev
2023-05-17 17:17 ` Mathieu Desnoyers via lttng-dev
2023-05-18 13:17 ` Brian Hutchinson via lttng-dev
2023-05-18 14:10 ` Brian Hutchinson via lttng-dev
2023-05-18 14:46 ` Mathieu Desnoyers via lttng-dev
2023-05-18 15:00 ` Brian Hutchinson via lttng-dev
2023-05-18 18:58 ` Brian Hutchinson via lttng-dev
2023-05-18 19:03 ` Mathieu Desnoyers via lttng-dev
2023-05-18 19:07 ` Brian Hutchinson via lttng-dev
2023-05-18 19:16 ` Mathieu Desnoyers via lttng-dev
2023-05-18 19:28 ` Brian Hutchinson via lttng-dev [this message]
2023-05-18 19:20 ` Brian Hutchinson via lttng-dev
2023-05-18 19:24 ` Mathieu Desnoyers via lttng-dev
2023-05-18 19:32 ` 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='CAFZh4h9VjVVtQ_0O2eU=BD171oi=yGEnDvmXky3LRPw3vb0OmA@mail.gmail.com' \
--to=lttng-dev@lists.lttng.org \
--cc=b.hutchman@gmail.com \
--cc=mathieu.desnoyers@efficios.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