diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2018-05-09 20:51:12 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2018-06-28 16:29:14 +0000 |
commit | 5e39b832e23889af0a5d39586fd3ccf0b1882667 (patch) | |
tree | d724eb126df7a2c974c4d14261f306da70b835d1 /src/tools/tracegen/lttng.cpp | |
parent | 40668b82f4609893322691cd3ba3446502cb06d3 (diff) |
Tracegen: add support for pointers and intptr-like types
In general we want to support pointers and pointer-like types
(intptr and its variations); the main use case is tracing an object's
address. Adjust the lttgt generator to use hex formatting
for this kind of aguments; ETW recognizes the pointer argument type
automatically.
Change-Id: I8249a49b6d0b2d468b84c0fbb7624625421cde9a
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Diffstat (limited to 'src/tools/tracegen/lttng.cpp')
-rw-r--r-- | src/tools/tracegen/lttng.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/tracegen/lttng.cpp b/src/tools/tracegen/lttng.cpp index 6c0d8cc88b..5d41bf5f1f 100644 --- a/src/tools/tracegen/lttng.cpp +++ b/src/tools/tracegen/lttng.cpp @@ -69,6 +69,10 @@ static void writeCtfMacro(QTextStream &stream, const Tracepoint::Field &field) case Tracepoint::Field::Integer: stream << "ctf_integer(" << paramType << ", " << name << ", " << name << ")"; return; + case Tracepoint::Field::IntegerHex: + case Tracepoint::Field::Pointer: + stream << "ctf_integer_hex(" << paramType << ", " << name << ", " << name << ")"; + return; case Tracepoint::Field::Float: stream << "ctf_float(" << paramType << ", " << name << ", " << name << ")"; return; |