[LITMUS^RT] RFC: record interrupt interference with Feather-Trace

Björn Brandenburg bbb at mpi-sws.org
Tue Jan 24 14:07:44 CET 2012


The below patch adds support for the new IRQ flags in the ftdump tool (part of the ft_tools repository).

- Björn

commit 6138184c2ad3e4027b0ab1958cde3da2a660147d
Author: Bjoern B. Brandenburg <bbb at cs.unc.edu>
Date:   Tue Jan 24 13:54:01 2012 +0100

    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.

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  <logfile>");





More information about the litmus-dev mailing list