Public bug reported:

[Impact]

* The C library shipped in libc6 is built with GCC's default behavior of
omitting the frame pointer that makes tracing and profiling harder.
Building GLibc with -fno-omit-frame-pointer and shipping it in an
optional libc6-prof binary package would help tracing and profiling
efforts.

[Test Case]

* Install libc6-prof and start tracing in one shell:

  sudo bpftrace -e 't:syscalls:sys_enter_clock_nanosleep /comm == "sleep"/ 
{printf("%s\n", ustack);}'
  Attaching 1 probe...

        clock_nanosleep+94
        __nanosleep+23
        0x5652a2e6b827

* Run the traced program in a different shell
 env LD_LIBRARY_PATH=/lib/libc6-prof/x86_64-linux-gnu sleep 1


* Repeat it without using the libc6-prof library:


 ubuntu@ff-glibc:~$ sleep 1

 ubuntu@ff-glibc:~$ sudo bpftrace -e 't:syscalls:sys_enter_clock_nanosleep 
/comm == "sleep"/ {printf("%s\n", ustack); }'
 Attaching 1 probe...

        clock_nanosleep+84

[ Where problems could occur ]

* Glibc does not build for some architectures with the additional 
-fno-omit-frame-pointer option which is tracked in LP: #1898049.
* The -fno-omit-frame-pointer option may sneak in to the regular build, this is 
convered in the test case.
* Libc6-prof may be slower thanks to the -fno-omit-frame-pointer option, this 
is expected and this is the reason for shipping it in a separate package.

** Affects: glibc (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1908307

Title:
  Please ship a glibc build for profiling in libc6-prof

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1908307/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to