perf-source: fix acquisition of time for comm and mmap events

We were not getting the proper value for time. We need sample_id_all set
according to my cursory reading of the core.c in the kernel. Also, the
time is aligned to 64-bit (after the comm field).
This commit is contained in:
Christian Hergert
2016-04-15 04:45:34 -07:00
parent 609ee997da
commit dd821b48e8
2 changed files with 20 additions and 25 deletions

View File

@ -31,18 +31,6 @@ typedef struct _SpPerfCounter SpPerfCounter;
#pragma pack(push, 1)
typedef struct
{
/*
* These fields are available as the suffix only because we have specified
* them when creating attributes. Be careful about using them.
* Ideally, we would probably switch from using structures overlaid with
* casts to a reader design, which knows about the attributes.
*/
guint32 pid, tid;
guint64 time;
} SpPerfCounterSuffix;
typedef struct
{
struct perf_event_header header;