diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2012-01-24 07:54:01 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-01-30 17:24:51 -0500 |
commit | 57069d06ed3b5086bf5ebd87998ae8afedbac7cc (patch) | |
tree | 695c98214cf0935b8b6bef88431f43ab6b1a6dc5 | |
parent | 765c1b704ec458a4224d9cd3e9cd38b5cf184395 (diff) |
Add support for IRQ flag and counter in binary trace format.2012.1
This introduces the new bit allocation and adds support to ftdump
for showing the values.
Not yet included is any support for filtering based on IRQ
interference.
-rw-r--r-- | include/timestamp.h | 4 | ||||
-rw-r--r-- | src/ftdump.c | 19 |
2 files changed, 13 insertions, 10 deletions
diff --git a/include/timestamp.h b/include/timestamp.h index f3dd6b8..75ab79a 100644 --- a/include/timestamp.h +++ b/include/timestamp.h | |||
@@ -14,7 +14,9 @@ struct timestamp { | |||
14 | uint32_t seq_no; | 14 | uint32_t seq_no; |
15 | uint8_t cpu; | 15 | uint8_t cpu; |
16 | uint8_t event; | 16 | uint8_t event; |
17 | uint8_t task_type; | 17 | uint8_t task_type:2; |
18 | uint8_t irq_flag:1; | ||
19 | uint8_t irq_count:5; | ||
18 | }; | 20 | }; |
19 | 21 | ||
20 | typedef uint32_t cmd_t; | 22 | typedef uint32_t cmd_t; |
diff --git a/src/ftdump.c b/src/ftdump.c index 39747c9..1462c4d 100644 --- a/src/ftdump.c +++ b/src/ftdump.c | |||
@@ -38,19 +38,22 @@ static void dump(struct timestamp* ts, size_t count) | |||
38 | printf("==== non-consecutive sequence number ====\n"); | 38 | printf("==== non-consecutive sequence number ====\n"); |
39 | last_seq = x->seq_no; | 39 | last_seq = x->seq_no; |
40 | if (name) | 40 | if (name) |
41 | printf("%-20s seq:%u timestamp:%llu cpu:%d type:%-8s \n", | 41 | printf("%-20s seq:%u timestamp:%llu cpu:%d type:%-8s irq:%u irqc:%02u \n", |
42 | name, x->seq_no, | 42 | name, x->seq_no, |
43 | (unsigned long long) x->timestamp, | 43 | (unsigned long long) x->timestamp, |
44 | x->cpu, | 44 | x->cpu, |
45 | task_type2str(x->task_type)); | 45 | task_type2str(x->task_type), |
46 | x->irq_flag, | ||
47 | x->irq_count); | ||
46 | else | 48 | else |
47 | printf("%16s:%3u seq:%u timestamp:%llu cpu:%u type:%-8s\n", | 49 | printf("%16s:%3u seq:%u timestamp:%llu cpu:%u type:%-8s irq:%u irqc:%02u\n", |
48 | "event", | 50 | "event", |
49 | (unsigned int) x->event, x->seq_no, | 51 | (unsigned int) x->event, x->seq_no, |
50 | (unsigned long long) x->timestamp, | 52 | (unsigned long long) x->timestamp, |
51 | x->cpu, | 53 | x->cpu, |
52 | task_type2str(x->task_type)); | 54 | task_type2str(x->task_type), |
53 | 55 | x->irq_flag, | |
56 | x->irq_count); | ||
54 | } | 57 | } |
55 | } | 58 | } |
56 | 59 | ||
@@ -75,14 +78,12 @@ int main(int argc, char** argv) | |||
75 | "\t offset(timestamp) = %3lu\n" | 78 | "\t offset(timestamp) = %3lu\n" |
76 | "\t offset(seq_no) = %3lu\n" | 79 | "\t offset(seq_no) = %3lu\n" |
77 | "\t offset(cpu) = %3lu\n" | 80 | "\t offset(cpu) = %3lu\n" |
78 | "\t offset(event) = %3lu\n" | 81 | "\t offset(event) = %3lu\n", |
79 | "\t offset(task_type) = %3lu\n", | ||
80 | (unsigned long) sizeof(struct timestamp), | 82 | (unsigned long) sizeof(struct timestamp), |
81 | offset(struct timestamp, timestamp), | 83 | offset(struct timestamp, timestamp), |
82 | offset(struct timestamp, seq_no), | 84 | offset(struct timestamp, seq_no), |
83 | offset(struct timestamp, cpu), | 85 | offset(struct timestamp, cpu), |
84 | offset(struct timestamp, event), | 86 | offset(struct timestamp, event)); |
85 | offset(struct timestamp, task_type)); | ||
86 | 87 | ||
87 | if (argc != 2) | 88 | if (argc != 2) |
88 | die("Usage: ftdump <logfile>"); | 89 | die("Usage: ftdump <logfile>"); |