diff options
author | Milian Wolff <milian.wolff@kdab.com> | 2017-07-04 11:27:52 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-05-02 14:05:33 +0000 |
commit | a156067e69c6066538286521effb6587144803f6 (patch) | |
tree | 7594446f96a0692acba77f36baa1dd5fcab08a90 /app/perfunwind.cpp | |
parent | 4478ce2b6daf19bd1cb74d20bfe6b9dbf5df6c50 (diff) |
Forward information on sampling frequency/period for events
This allows us to reconstruct the sample period for data files
generated with the following command:
perf record -c 100000 ...
Without the explicit `-P` flag, the above data file has no periods
for the samples. By forwarding the event attribute configuration,
clients can reconstruct the data as needed.
Change-Id: I098e1f14cc66e97daaceffb288080868693c2d95
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Diffstat (limited to 'app/perfunwind.cpp')
-rw-r--r-- | app/perfunwind.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/perfunwind.cpp b/app/perfunwind.cpp index 90d3f8c..3eef7d8 100644 --- a/app/perfunwind.cpp +++ b/app/perfunwind.cpp @@ -260,7 +260,8 @@ void PerfUnwind::sendAttributes(qint32 id, const PerfEventAttributes &attributes QByteArray buffer; QDataStream(&buffer, QIODevice::WriteOnly) << static_cast<quint8>(AttributesDefinition) << id << attributes.type() - << attributes.config() << attrNameId; + << attributes.config() << attrNameId + << attributes.usesFrequency() << attributes.frequenyOrPeriod(); sendBuffer(buffer); } |