Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269077
b: refs/heads/master
c: 6249687
h: refs/heads/master
i:
  269075: 7a9d2ab
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Sep 19, 2011
1 parent 94c56a8 commit 4519564
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c64e148a3be3cb786534ad38298c25c833116c26
refs/heads/master: 6249687f76b69cc0b2ad34636f4a18d693ef3262
1 change: 1 addition & 0 deletions trunk/include/linux/trace_clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
extern u64 notrace trace_clock_local(void);
extern u64 notrace trace_clock(void);
extern u64 notrace trace_clock_global(void);
extern u64 notrace trace_clock_counter(void);

#endif /* _LINUX_TRACE_CLOCK_H */
1 change: 1 addition & 0 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ static struct {
} trace_clocks[] = {
{ trace_clock_local, "local" },
{ trace_clock_global, "global" },
{ trace_clock_counter, "counter" },
};

int trace_clock_id;
Expand Down
12 changes: 12 additions & 0 deletions trunk/kernel/trace/trace_clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,15 @@ u64 notrace trace_clock_global(void)

return now;
}

static atomic64_t trace_counter;

/*
* trace_clock_counter(): simply an atomic counter.
* Use the trace_counter "counter" for cases where you do not care
* about timings, but are interested in strict ordering.
*/
u64 notrace trace_clock_counter(void)
{
return atomic64_add_return(1, &trace_counter);
}

0 comments on commit 4519564

Please sign in to comment.