Lines Matching refs:pevent

159 static PyObject *pyrf_mmap_event__repr(struct pyrf_event *pevent)  in pyrf_mmap_event__repr()  argument
167 pevent->event.mmap.pid, pevent->event.mmap.tid, in pyrf_mmap_event__repr()
168 pevent->event.mmap.start, pevent->event.mmap.len, in pyrf_mmap_event__repr()
169 pevent->event.mmap.pgoff, pevent->event.mmap.filename) < 0) { in pyrf_mmap_event__repr()
201 static PyObject *pyrf_task_event__repr(struct pyrf_event *pevent) in pyrf_task_event__repr() argument
205 pevent->event.header.type == PERF_RECORD_FORK ? "fork" : "exit", in pyrf_task_event__repr()
206 pevent->event.fork.pid, in pyrf_task_event__repr()
207 pevent->event.fork.ppid, in pyrf_task_event__repr()
208 pevent->event.fork.tid, in pyrf_task_event__repr()
209 pevent->event.fork.ptid, in pyrf_task_event__repr()
210 pevent->event.fork.time); in pyrf_task_event__repr()
234 static PyObject *pyrf_comm_event__repr(struct pyrf_event *pevent) in pyrf_comm_event__repr() argument
237 pevent->event.comm.pid, in pyrf_comm_event__repr()
238 pevent->event.comm.tid, in pyrf_comm_event__repr()
239 pevent->event.comm.comm); in pyrf_comm_event__repr()
263 static PyObject *pyrf_throttle_event__repr(struct pyrf_event *pevent) in pyrf_throttle_event__repr() argument
265 struct perf_record_throttle *te = (struct perf_record_throttle *)(&pevent->event.header + 1); in pyrf_throttle_event__repr()
269 pevent->event.header.type == PERF_RECORD_THROTTLE ? "" : "un", in pyrf_throttle_event__repr()
292 static PyObject *pyrf_lost_event__repr(struct pyrf_event *pevent) in pyrf_lost_event__repr() argument
299 pevent->event.lost.id, pevent->event.lost.lost) < 0) { in pyrf_lost_event__repr()
327 static PyObject *pyrf_read_event__repr(struct pyrf_event *pevent) in pyrf_read_event__repr() argument
330 pevent->event.read.pid, in pyrf_read_event__repr()
331 pevent->event.read.tid); in pyrf_read_event__repr()
356 static PyObject *pyrf_sample_event__repr(struct pyrf_event *pevent) in pyrf_sample_event__repr() argument
370 static bool is_tracepoint(struct pyrf_event *pevent) in is_tracepoint() argument
372 return pevent->evsel->core.attr.type == PERF_TYPE_TRACEPOINT; in is_tracepoint()
378 struct tep_handle *pevent = field->event->tep; in tracepoint_field() local
388 val = tep_read_number(pevent, data + offset, len); in tracepoint_field()
401 val = tep_read_number(pevent, data + field->offset, in tracepoint_field()
415 get_tracepoint_field(struct pyrf_event *pevent, PyObject *attr_name) in get_tracepoint_field() argument
418 struct evsel *evsel = pevent->evsel; in get_tracepoint_field()
435 return tracepoint_field(pevent, field); in get_tracepoint_field()
439 pyrf_sample_event__getattro(struct pyrf_event *pevent, PyObject *attr_name) in pyrf_sample_event__getattro() argument
443 if (is_tracepoint(pevent)) in pyrf_sample_event__getattro()
444 obj = get_tracepoint_field(pevent, attr_name); in pyrf_sample_event__getattro()
446 return obj ?: PyObject_GenericGetAttr((PyObject *) pevent, attr_name); in pyrf_sample_event__getattro()
470 static PyObject *pyrf_context_switch_event__repr(struct pyrf_event *pevent) in pyrf_context_switch_event__repr() argument
476 pevent->event.context_switch.next_prev_pid, in pyrf_context_switch_event__repr()
477 pevent->event.context_switch.next_prev_tid, in pyrf_context_switch_event__repr()
478 !!(pevent->event.header.misc & PERF_RECORD_MISC_SWITCH_OUT)) < 0) { in pyrf_context_switch_event__repr()
552 struct pyrf_event *pevent; in pyrf_event__new() local
562 pevent = PyObject_New(struct pyrf_event, ptype); in pyrf_event__new()
563 if (pevent != NULL) in pyrf_event__new()
564 memcpy(&pevent->event, event, event->header.size); in pyrf_event__new()
565 return (PyObject *)pevent; in pyrf_event__new()
1052 struct pyrf_event *pevent = (struct pyrf_event *)pyevent; in pyrf_evlist__read_on_cpu() local
1064 pevent->evsel = evsel; in pyrf_evlist__read_on_cpu()
1066 err = evsel__parse_sample(evsel, event, &pevent->sample); in pyrf_evlist__read_on_cpu()