From a156067e69c6066538286521effb6587144803f6 Mon Sep 17 00:00:00 2001 From: Milian Wolff Date: Tue, 4 Jul 2017 11:27:52 +0200 Subject: 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 --- app/perfunwind.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/perfunwind.cpp') 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(AttributesDefinition) << id << attributes.type() - << attributes.config() << attrNameId; + << attributes.config() << attrNameId + << attributes.usesFrequency() << attributes.frequenyOrPeriod(); sendBuffer(buffer); } -- cgit v1.2.3