Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191247
b: refs/heads/master
c: e1889d7
h: refs/heads/master
i:
  191245: d2604de
  191243: 01b2cef
  191239: ea5af31
  191231: 296ac94
v: v3
  • Loading branch information
Frederic Weisbecker committed Apr 24, 2010
1 parent 22d28e8 commit 079136a
Show file tree
Hide file tree
Showing 2 changed files with 13 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: 9df9bbba9f7e2e4ffdc51bbbfa524b67691321d2
refs/heads/master: e1889d75aff0c3786bc53aeb7d9eaca0691c19c5
12 changes: 12 additions & 0 deletions trunk/tools/perf/builtin-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

static char const *script_name;
static char const *generate_script_lang;
static bool debug_ordering;
static u64 last_timestamp;

static int default_start_script(const char *script __unused,
int argc __unused,
Expand Down Expand Up @@ -87,6 +89,14 @@ static int process_sample_event(event_t *event, struct perf_session *session)
}

if (session->sample_type & PERF_SAMPLE_RAW) {
if (debug_ordering) {
if (data.time < last_timestamp) {
pr_err("Samples misordered, previous: %llu "
"this: %llu\n", last_timestamp,
data.time);
}
last_timestamp = data.time;
}
/*
* FIXME: better resolve from pid from the struct trace_entry
* field, although it should be the same than this perf
Expand Down Expand Up @@ -532,6 +542,8 @@ static const struct option options[] = {
"generate perf-trace.xx script in specified language"),
OPT_STRING('i', "input", &input_name, "file",
"input file name"),
OPT_BOOLEAN('d', "debug-ordering", &debug_ordering,
"check that samples time ordering is monotonic"),

OPT_END()
};
Expand Down

0 comments on commit 079136a

Please sign in to comment.