struct dso *dso = NULL;
struct thread *thread;
u64 ip = event->ip.ip;
+ u32 cpu = -1;
u64 period = 1;
void *more_data = event->ip.__more_data;
int cpumode;
thread = threads__findnew(event->ip.pid, &threads, &last_match);
+ if (sample_type & PERF_SAMPLE_CPU) {
+ cpu = *(u32 *)more_data;
+ more_data += sizeof(u32);
+ more_data += sizeof(u32); /* reserved */
+ }
+
if (sample_type & PERF_SAMPLE_PERIOD) {
period = *(u64 *)more_data;
more_data += sizeof(u64);
* field, although it should be the same than this perf
* event pid
*/
- print_event(0, raw->data, raw->size, 0, thread->comm);
+ print_event(cpu, raw->data, raw->size, 0, thread->comm);
}
total += period;