]> sourceware.org Git - systemtap.git/commit
Improve BPF tracepoint probe derivation
authorAaron Merey <amerey@redhat.com>
Fri, 9 Mar 2018 23:27:21 +0000 (18:27 -0500)
committerAaron Merey <amerey@redhat.com>
Sat, 10 Mar 2018 00:14:25 +0000 (19:14 -0500)
commit072e888f19c26abe9bb3f604149066e9a15f0df3
tree5295eb523a3585d41eb5ce478794dbbb91593246
parent857c80020cf5e96f524b057b663d607483a6b32b
Improve BPF tracepoint probe derivation

One goal of BPF tracepoint probe derivation is to determine the offsets of the members
of the BPF tracepoint context structs. These members are the probe's context variables.
The context structs always contain 8 bytes of padding before their first member.

During the probe derivation process, the context structs are replicated in the tracequery
modules and we read the module's debuginfo in order to determine the offsets of the
struct's members. Previously, the 8 bytes of padding was not included in the tracequery
structs and instead 8 was added to the offsets of members of these structs. This approach
ignores the possibility that these 8 bytes of padding could influence the amount of
padding between the struct's other members. This would result in incorrect offsets.

This patch adds an 8 byte member to the front of each of the tracequery structs to ensure
they are proper replicas of the tracepoint context structs.
tapsets.cxx
This page took 0.025353 seconds and 5 git commands to generate.