Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163785
b: refs/heads/master
c: 393b2ad
h: refs/heads/master
i:
  163783: f25943d
v: v3
  • Loading branch information
Arjan van de Ven authored and Ingo Molnar committed Sep 19, 2009
1 parent 669dea5 commit b7756aa
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 929bf0d0156562ce631728b6fa53d68004d456d2
refs/heads/master: 393b2ad8c757ba3ccd2a99ca5bbcd6db4d3fa53d
2 changes: 2 additions & 0 deletions trunk/include/linux/perf_counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ enum perf_event_type {
* struct perf_event_header header;
* u32 pid, ppid;
* u32 tid, ptid;
* u64 time;
* };
*/
PERF_EVENT_EXIT = 4,
Expand All @@ -356,6 +357,7 @@ enum perf_event_type {
* struct perf_event_header header;
* u32 pid, ppid;
* u32 tid, ptid;
* { u64 time; } && PERF_SAMPLE_TIME
* };
*/
PERF_EVENT_FORK = 7,
Expand Down
11 changes: 9 additions & 2 deletions trunk/kernel/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -3083,16 +3083,20 @@ struct perf_task_event {
u32 ppid;
u32 tid;
u32 ptid;
u64 time;
} event;
};

static void perf_counter_task_output(struct perf_counter *counter,
struct perf_task_event *task_event)
{
struct perf_output_handle handle;
int size = task_event->event.header.size;
int size;
struct task_struct *task = task_event->task;
int ret = perf_output_begin(&handle, counter, size, 0, 0);
int ret;

size = task_event->event.header.size;
ret = perf_output_begin(&handle, counter, size, 0, 0);

if (ret)
return;
Expand All @@ -3103,7 +3107,10 @@ static void perf_counter_task_output(struct perf_counter *counter,
task_event->event.tid = perf_counter_tid(counter, task);
task_event->event.ptid = perf_counter_tid(counter, current);

task_event->event.time = perf_clock();

perf_output_put(&handle, task_event->event);

perf_output_end(&handle);
}

Expand Down
1 change: 1 addition & 0 deletions trunk/tools/perf/util/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ struct fork_event {
struct perf_event_header header;
u32 pid, ppid;
u32 tid, ptid;
u64 time;
};

struct lost_event {
Expand Down

0 comments on commit b7756aa

Please sign in to comment.