static void pid_fork(int pid, int ppid, u64 timestamp) { struct per_pid *p, *pp; p = find_create_pid(pid); pp = find_create_pid(ppid); p->ppid = ppid; if (pp->current && pp->current->comm && !p->current) pid_set_comm(pid, pp->current->comm); p->start_time = timestamp; if (p->current) { p->current->start_time = timestamp; p->current->state_since = timestamp; } }
static int process_comm_event(event_t *event) { pid_set_comm(event->comm.pid, event->comm.comm); return 0; }