Support base + index * scale addressing for USDT arguments
authorSasha Goldshtein <goldshtn@gmail.com>
Sun, 19 Feb 2017 20:29:45 +0000 (20:29 +0000)
committerSasha Goldshtein <goldshtn@gmail.com>
Sun, 19 Feb 2017 20:37:47 +0000 (20:37 +0000)
commit8698bdb021cd3385e6eeac64e438b66d840721c0
treef0ecce5fa0eee590965af4f1f290f715c1501999
parent5f354e5a4246390682c626dacc9f92cf30203711
Support base + index * scale addressing for USDT arguments

It turns out that some software will have USDT probe arguments
referencing memory using the full `nnn@(%basereg + %idxreg * scale`
syntax. This is represented as `nnn@(%basereg,%idxreg,scale)` in
the `NT_STAPSDT` note, encountered in building a recent version of
PostgreSQL on FC25.

This format is now recognized by the USDT parser, and the correct
BPF code is emitted to retrieve arguments that reference memory
using this full addressing syntax.`
src/cc/bcc_usdt.h
src/cc/usdt.cc
src/cc/usdt.h
src/cc/usdt_args.cc
src/python/bcc/libbcc.py
src/python/bcc/usdt.py
tests/cc/test_usdt_args.cc