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