Lines Matching refs:pevent
198 static PyObject *pyrf_mmap_event__repr(struct pyrf_event *pevent) in pyrf_mmap_event__repr() argument
206 pevent->event.mmap.pid, pevent->event.mmap.tid, in pyrf_mmap_event__repr()
207 pevent->event.mmap.start, pevent->event.mmap.len, in pyrf_mmap_event__repr()
208 pevent->event.mmap.pgoff, pevent->event.mmap.filename) < 0) { in pyrf_mmap_event__repr()
240 static PyObject *pyrf_task_event__repr(struct pyrf_event *pevent) in pyrf_task_event__repr() argument
244 pevent->event.header.type == PERF_RECORD_FORK ? "fork" : "exit", in pyrf_task_event__repr()
245 pevent->event.fork.pid, in pyrf_task_event__repr()
246 pevent->event.fork.ppid, in pyrf_task_event__repr()
247 pevent->event.fork.tid, in pyrf_task_event__repr()
248 pevent->event.fork.ptid, in pyrf_task_event__repr()
249 pevent->event.fork.time); in pyrf_task_event__repr()
273 static PyObject *pyrf_comm_event__repr(struct pyrf_event *pevent) in pyrf_comm_event__repr() argument
276 pevent->event.comm.pid, in pyrf_comm_event__repr()
277 pevent->event.comm.tid, in pyrf_comm_event__repr()
278 pevent->event.comm.comm); in pyrf_comm_event__repr()
302 static PyObject *pyrf_throttle_event__repr(struct pyrf_event *pevent) in pyrf_throttle_event__repr() argument
304 struct perf_record_throttle *te = (struct perf_record_throttle *)(&pevent->event.header + 1); in pyrf_throttle_event__repr()
308 pevent->event.header.type == PERF_RECORD_THROTTLE ? "" : "un", in pyrf_throttle_event__repr()
331 static PyObject *pyrf_lost_event__repr(struct pyrf_event *pevent) in pyrf_lost_event__repr() argument
338 pevent->event.lost.id, pevent->event.lost.lost) < 0) { in pyrf_lost_event__repr()
366 static PyObject *pyrf_read_event__repr(struct pyrf_event *pevent) in pyrf_read_event__repr() argument
369 pevent->event.read.pid, in pyrf_read_event__repr()
370 pevent->event.read.tid); in pyrf_read_event__repr()
395 static PyObject *pyrf_sample_event__repr(struct pyrf_event *pevent) in pyrf_sample_event__repr() argument
409 static bool is_tracepoint(struct pyrf_event *pevent) in is_tracepoint() argument
411 return pevent->evsel->core.attr.type == PERF_TYPE_TRACEPOINT; in is_tracepoint()
417 struct tep_handle *pevent = field->event->tep; in tracepoint_field() local
427 val = tep_read_number(pevent, data + offset, len); in tracepoint_field()
440 val = tep_read_number(pevent, data + field->offset, in tracepoint_field()
454 get_tracepoint_field(struct pyrf_event *pevent, PyObject *attr_name) in get_tracepoint_field() argument
457 struct evsel *evsel = pevent->evsel; in get_tracepoint_field()
474 return tracepoint_field(pevent, field); in get_tracepoint_field()
478 pyrf_sample_event__getattro(struct pyrf_event *pevent, PyObject *attr_name) in pyrf_sample_event__getattro() argument
482 if (is_tracepoint(pevent)) in pyrf_sample_event__getattro()
483 obj = get_tracepoint_field(pevent, attr_name); in pyrf_sample_event__getattro()
485 return obj ?: PyObject_GenericGetAttr((PyObject *) pevent, attr_name); in pyrf_sample_event__getattro()
509 static PyObject *pyrf_context_switch_event__repr(struct pyrf_event *pevent) in pyrf_context_switch_event__repr() argument
515 pevent->event.context_switch.next_prev_pid, in pyrf_context_switch_event__repr()
516 pevent->event.context_switch.next_prev_tid, in pyrf_context_switch_event__repr()
517 !!(pevent->event.header.misc & PERF_RECORD_MISC_SWITCH_OUT)) < 0) { in pyrf_context_switch_event__repr()
591 struct pyrf_event *pevent; in pyrf_event__new() local
601 pevent = PyObject_New(struct pyrf_event, ptype); in pyrf_event__new()
602 if (pevent != NULL) in pyrf_event__new()
603 memcpy(&pevent->event, event, event->header.size); in pyrf_event__new()
604 return (PyObject *)pevent; in pyrf_event__new()
1091 struct pyrf_event *pevent = (struct pyrf_event *)pyevent; in pyrf_evlist__read_on_cpu() local
1103 pevent->evsel = evsel; in pyrf_evlist__read_on_cpu()
1105 err = evsel__parse_sample(evsel, event, &pevent->sample); in pyrf_evlist__read_on_cpu()