0

I was trying to compile my own kernel through clang-13 and run systemtap on that. I have enabled the CONFIG_DEBUG_INFO, CONFIG_DEBUG_KERNEL and all other default debugging configs including CONFIG_KPROBES, CONFIG_UPROBES. Additionally I have disabled CONFIG_RANDOMIZE_BASE. To compile and install I ran make -j8 bindeb-pkg && sudo dpkg -i ../*.deb. As you can see from the screenshot below the dbg package was installed and the sha256 confirms that the vmlinux matches, so systemtap should have access to its symbols. However, that doesn't seem to be the case since systemtap fails.

Additionally I compile the latest systemtap with clang-13 as follows make -j8 CC=clang-13 CXX=clang++-13 CFLAGS="-Wno-error" CXXFLAGS="-Wno-error".

The systemtap version is 4.7/0.170 and it says tested kernel versions: 2.6.32 ... 5.15.0-rc7. I might be missing something here.

Installed kernel's version

anon
  • 188
  • 1
  • 13
  • **DO NOT post images of code, data, error messages, etc.** - copy or type the text into the question. [ask] – Rob Feb 19 '22 at 13:19

1 Answers1

0

Tracepoints in stap are identified by chewing through kernel headers (and sometimes sources). You can check whether stap is finding them with greater verbosity, such as:

stap -k -p2 --poison-cache --vp 04 -e 'probe ....'

If it's working, you'll see a lot of compiler invocations related to "tracequery", and you can see the residue of the searches under $TMPDIR (due to the -k option).

fche
  • 2,641
  • 20
  • 28