Lines Matching defs:pevent

256 static PyObject *pyrf_mmap_event__repr(struct pyrf_event *pevent)
264 pevent->event.mmap.pid, pevent->event.mmap.tid,
265 pevent->event.mmap.start, pevent->event.mmap.len,
266 pevent->event.mmap.pgoff, pevent->event.mmap.filename) < 0) {
298 static PyObject *pyrf_task_event__repr(struct pyrf_event *pevent)
302 pevent->event.header.type == PERF_RECORD_FORK ? "fork" : "exit",
303 pevent->event.fork.pid,
304 pevent->event.fork.ppid,
305 pevent->event.fork.tid,
306 pevent->event.fork.ptid,
307 pevent->event.fork.time);
331 static PyObject *pyrf_comm_event__repr(struct pyrf_event *pevent)
334 pevent->event.comm.pid,
335 pevent->event.comm.tid,
336 pevent->event.comm.comm);
360 static PyObject *pyrf_throttle_event__repr(struct pyrf_event *pevent)
362 struct perf_record_throttle *te = (struct perf_record_throttle *)(&pevent->event.header + 1);
366 pevent->event.header.type == PERF_RECORD_THROTTLE ? "" : "un",
389 static PyObject *pyrf_lost_event__repr(struct pyrf_event *pevent)
396 pevent->event.lost.id, pevent->event.lost.lost) < 0) {
424 static PyObject *pyrf_read_event__repr(struct pyrf_event *pevent)
427 pevent->event.read.pid,
428 pevent->event.read.tid);
453 static PyObject *pyrf_sample_event__repr(struct pyrf_event *pevent)
468 static bool is_tracepoint(struct pyrf_event *pevent)
470 return pevent->evsel->core.attr.type == PERF_TYPE_TRACEPOINT;
476 struct tep_handle *pevent = field->event->tep;
486 val = tep_read_number(pevent, data + offset, len);
501 val = tep_read_number(pevent, data + field->offset,
515 get_tracepoint_field(struct pyrf_event *pevent, PyObject *attr_name)
518 struct evsel *evsel = pevent->evsel;
535 return tracepoint_field(pevent, field);
540 pyrf_sample_event__getattro(struct pyrf_event *pevent, PyObject *attr_name)
545 if (is_tracepoint(pevent))
546 obj = get_tracepoint_field(pevent, attr_name);
549 return obj ?: PyObject_GenericGetAttr((PyObject *) pevent, attr_name);
573 static PyObject *pyrf_context_switch_event__repr(struct pyrf_event *pevent)
579 pevent->event.context_switch.next_prev_pid,
580 pevent->event.context_switch.next_prev_tid,
581 !!(pevent->event.header.misc & PERF_RECORD_MISC_SWITCH_OUT)) < 0) {
655 struct pyrf_event *pevent;
665 pevent = PyObject_New(struct pyrf_event, ptype);
666 if (pevent != NULL)
667 memcpy(&pevent->event, event, event->header.size);
668 return (PyObject *)pevent;
1155 struct pyrf_event *pevent = (struct pyrf_event *)pyevent;
1167 pevent->evsel = evsel;
1169 err = evsel__parse_sample(evsel, event, &pevent->sample);