summaryrefslogtreecommitdiffstats
path: root/src/tools/tracegen/lttng.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2018-05-09 20:51:12 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2018-06-28 16:29:14 +0000
commit5e39b832e23889af0a5d39586fd3ccf0b1882667 (patch)
treed724eb126df7a2c974c4d14261f306da70b835d1 /src/tools/tracegen/lttng.cpp
parent40668b82f4609893322691cd3ba3446502cb06d3 (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.cpp4
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;