From 57069d06ed3b5086bf5ebd87998ae8afedbac7cc Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Tue, 24 Jan 2012 13:54:01 +0100 Subject: Add support for IRQ flag and counter in binary trace format. 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. --- include/timestamp.h | 4 +++- 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 { uint32_t seq_no; uint8_t cpu; uint8_t event; - uint8_t task_type; + uint8_t task_type:2; + uint8_t irq_flag:1; + uint8_t irq_count:5; }; 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) printf("==== non-consecutive sequence number ====\n"); last_seq = x->seq_no; if (name) - printf("%-20s seq:%u timestamp:%llu cpu:%d type:%-8s \n", + printf("%-20s seq:%u timestamp:%llu cpu:%d type:%-8s irq:%u irqc:%02u \n", name, x->seq_no, (unsigned long long) x->timestamp, x->cpu, - task_type2str(x->task_type)); + task_type2str(x->task_type), + x->irq_flag, + x->irq_count); else - printf("%16s:%3u seq:%u timestamp:%llu cpu:%u type:%-8s\n", + printf("%16s:%3u seq:%u timestamp:%llu cpu:%u type:%-8s irq:%u irqc:%02u\n", "event", (unsigned int) x->event, x->seq_no, (unsigned long long) x->timestamp, x->cpu, - task_type2str(x->task_type)); - + task_type2str(x->task_type), + x->irq_flag, + x->irq_count); } } @@ -75,14 +78,12 @@ int main(int argc, char** argv) "\t offset(timestamp) = %3lu\n" "\t offset(seq_no) = %3lu\n" "\t offset(cpu) = %3lu\n" - "\t offset(event) = %3lu\n" - "\t offset(task_type) = %3lu\n", + "\t offset(event) = %3lu\n", (unsigned long) sizeof(struct timestamp), offset(struct timestamp, timestamp), offset(struct timestamp, seq_no), offset(struct timestamp, cpu), - offset(struct timestamp, event), - offset(struct timestamp, task_type)); + offset(struct timestamp, event)); if (argc != 2) die("Usage: ftdump "); -- cgit v1.2.2