PERF_SAMPLE_CPU = 1U << 7,
PERF_SAMPLE_PERIOD = 1U << 8,
PERF_SAMPLE_STREAM_ID = 1U << 9,
- PERF_SAMPLE_TP_RECORD = 1U << 10,
+ PERF_SAMPLE_RAW = 1U << 10,
PERF_SAMPLE_MAX = 1U << 11, /* non-ABI */
};
__u64 ip[PERF_MAX_STACK_DEPTH];
};
-struct perf_tracepoint_record {
- int size;
- char *record;
+struct perf_raw_record {
+ u32 size;
+ void *data;
};
struct task_struct;
struct pt_regs *regs;
u64 addr;
u64 period;
- void *private;
+ struct perf_raw_record *raw;
};
extern int perf_counter_overflow(struct perf_counter *counter, int nmi,
u64 counter;
} group_entry;
struct perf_callchain_entry *callchain = NULL;
- struct perf_tracepoint_record *tp = NULL;
+ struct perf_raw_record *raw = NULL;
int callchain_size = 0;
u64 time;
struct {
header.size += sizeof(u64);
}
- if (sample_type & PERF_SAMPLE_TP_RECORD) {
- tp = data->private;
- if (tp)
- header.size += tp->size;
+ if (sample_type & PERF_SAMPLE_RAW) {
+ raw = data->raw;
+ if (raw)
+ header.size += raw->size;
}
ret = perf_output_begin(&handle, counter, header.size, nmi, 1);
}
}
- if ((sample_type & PERF_SAMPLE_TP_RECORD) && tp)
- perf_output_copy(&handle, tp->record, tp->size);
+ if ((sample_type & PERF_SAMPLE_RAW) && raw)
+ perf_output_copy(&handle, raw->data, raw->size);
perf_output_end(&handle);
}
void perf_tpcounter_event(int event_id, u64 addr, u64 count, void *record,
int entry_size)
{
- struct perf_tracepoint_record tp = {
+ struct perf_raw_record raw = {
.size = entry_size,
- .record = record,
+ .data = record,
};
struct perf_sample_data data = {
.regs = get_irq_regs(),
.addr = addr,
- .private = &tp,
+ .raw = &raw,
};
if (!data.regs)