static void dbg_printf_pevent_info(struct event_format *event, struct pevent_record *rec) { static struct trace_seq s; event->pevent->print_raw = 1; trace_seq_init(&s); pevent_event_info(&s, event, rec); trace_seq_putc(&s, '\n'); trace_seq_terminate(&s); fprintf(stderr, "%.*s", s.len, s.buffer); trace_seq_destroy(&s); }
static void write_and_save_comm(struct format_field *field, struct tep_record *record, struct trace_seq *s, int pid) { const char *comm; int len; comm = (char *)(record->data + field->offset); len = s->len; trace_seq_printf(s, "%.*s", field->size, comm); /* make sure the comm has a \0 at the end. */ trace_seq_terminate(s); comm = &s->buffer[len]; /* Help out the comm to ids. This will handle dups */ tep_register_comm(field->event->pevent, comm, pid); }