diff options
| author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-08-15 07:40:36 -0400 |
|---|---|---|
| committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-10-19 16:38:25 -0400 |
| commit | 2265873941ade09b9ba4eb754278818cd5801d3a (patch) | |
| tree | 2c3c66098955510549ef92c612fd36499d4b5a15 /src | |
| parent | dc9421543acf741a8c3aab32cc3630b33d7116bc (diff) | |
Update timestamp structure to reflect PID field
Diffstat (limited to 'src')
| -rw-r--r-- | src/ftdump.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/ftdump.c b/src/ftdump.c index 1462c4d..1e4bc12 100644 --- a/src/ftdump.c +++ b/src/ftdump.c | |||
| @@ -29,26 +29,30 @@ | |||
| 29 | static void dump(struct timestamp* ts, size_t count) | 29 | static void dump(struct timestamp* ts, size_t count) |
| 30 | { | 30 | { |
| 31 | struct timestamp *x; | 31 | struct timestamp *x; |
| 32 | unsigned int last_seq = 0; | 32 | uint32_t last_seq = 0, next_seq; |
| 33 | const char* name; | 33 | const char* name; |
| 34 | while (count--) { | 34 | while (count--) { |
| 35 | x = ts++; | 35 | x = ts++; |
| 36 | name = event2str(x->event); | 36 | name = event2str(x->event); |
| 37 | if (last_seq && last_seq + 1 != x->seq_no) | 37 | next_seq = last_seq + 1; |
| 38 | if (last_seq && next_seq != x->seq_no) | ||
| 38 | printf("==== non-consecutive sequence number ====\n"); | 39 | printf("==== non-consecutive sequence number ====\n"); |
| 39 | last_seq = x->seq_no; | 40 | last_seq = x->seq_no; |
| 40 | if (name) | 41 | if (name) |
| 41 | printf("%-20s seq:%u timestamp:%llu cpu:%d type:%-8s irq:%u irqc:%02u \n", | 42 | printf("%-20s seq:%u pid:%u timestamp:%llu cpu:%d" |
| 43 | " type:%-8s irq:%u irqc:%02u \n", | ||
| 42 | name, x->seq_no, | 44 | name, x->seq_no, |
| 45 | x->pid, | ||
| 43 | (unsigned long long) x->timestamp, | 46 | (unsigned long long) x->timestamp, |
| 44 | x->cpu, | 47 | x->cpu, |
| 45 | task_type2str(x->task_type), | 48 | task_type2str(x->task_type), |
| 46 | x->irq_flag, | 49 | x->irq_flag, |
| 47 | x->irq_count); | 50 | x->irq_count); |
| 48 | else | 51 | else |
| 49 | printf("%16s:%3u seq:%u timestamp:%llu cpu:%u type:%-8s irq:%u irqc:%02u\n", | 52 | printf("%16s:%3u seq:%u pid:%u timestamp:%llu cpu:%u" |
| 53 | " type:%-8s irq:%u irqc:%02u\n", | ||
| 50 | "event", | 54 | "event", |
| 51 | (unsigned int) x->event, x->seq_no, | 55 | (unsigned int) x->event, x->seq_no, x->pid, |
| 52 | (unsigned long long) x->timestamp, | 56 | (unsigned long long) x->timestamp, |
| 53 | x->cpu, | 57 | x->cpu, |
| 54 | task_type2str(x->task_type), | 58 | task_type2str(x->task_type), |
| @@ -75,12 +79,10 @@ int main(int argc, char** argv) | |||
| 75 | 79 | ||
| 76 | printf("struct timestamp:\n" | 80 | printf("struct timestamp:\n" |
| 77 | "\t size = %3lu\n" | 81 | "\t size = %3lu\n" |
| 78 | "\t offset(timestamp) = %3lu\n" | ||
| 79 | "\t offset(seq_no) = %3lu\n" | 82 | "\t offset(seq_no) = %3lu\n" |
| 80 | "\t offset(cpu) = %3lu\n" | 83 | "\t offset(cpu) = %3lu\n" |
| 81 | "\t offset(event) = %3lu\n", | 84 | "\t offset(event) = %3lu\n", |
| 82 | (unsigned long) sizeof(struct timestamp), | 85 | (unsigned long) sizeof(struct timestamp), |
| 83 | offset(struct timestamp, timestamp), | ||
| 84 | offset(struct timestamp, seq_no), | 86 | offset(struct timestamp, seq_no), |
| 85 | offset(struct timestamp, cpu), | 87 | offset(struct timestamp, cpu), |
| 86 | offset(struct timestamp, event)); | 88 | offset(struct timestamp, event)); |
