aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2008-05-22 12:44:51 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2008-05-22 12:44:51 -0400
commit5ef64e006c200e7213ae3cc52cb02bd172bfe97d (patch)
tree1066722183ab4c9fb34c59176d4bc1619bfe4924
parent1e68c15dfd99e85be1eecdd1c426a35c6b8a6cc5 (diff)
another kernel data format change
don't use timestamps that did not involve a real-time task
-rw-r--r--include/timestamp.h11
-rw-r--r--src/ft2csv.c8
2 files changed, 15 insertions, 4 deletions
diff --git a/include/timestamp.h b/include/timestamp.h
index ec16d04..b3393ed 100644
--- a/include/timestamp.h
+++ b/include/timestamp.h
@@ -3,11 +3,18 @@
3 3
4#include <stdint.h> 4#include <stdint.h>
5 5
6enum task_type_marker {
7 TSK_BE,
8 TSK_RT,
9 TSK_UNKNOWN
10};
11
6struct timestamp { 12struct timestamp {
7 uint64_t timestamp; 13 uint64_t timestamp;
8 uint32_t seq_no; 14 uint32_t seq_no;
9 uint16_t cpu; 15 uint8_t cpu;
10 uint16_t event; 16 uint8_t event;
17 uint8_t task_type;
11}; 18};
12 19
13typedef uint32_t cmd_t; 20typedef uint32_t cmd_t;
diff --git a/src/ft2csv.c b/src/ft2csv.c
index 3d64b34..a19d2f2 100644
--- a/src/ft2csv.c
+++ b/src/ft2csv.c
@@ -11,6 +11,7 @@ static unsigned int complete = 0;
11static unsigned int incomplete = 0; 11static unsigned int incomplete = 0;
12static unsigned int filtered = 0; 12static unsigned int filtered = 0;
13static unsigned int skipped = 0; 13static unsigned int skipped = 0;
14static unsigned int non_rt = 0;
14 15
15static unsigned long long threshold = 2700 * 1000; /* 1 ms == 1 full tick */ 16static unsigned long long threshold = 2700 * 1000; /* 1 ms == 1 full tick */
16//static unsigned long long threshold = 2700 * 50; /* 1 ms == 1 full tick */ 17//static unsigned long long threshold = 2700 * 50; /* 1 ms == 1 full tick */
@@ -49,6 +50,8 @@ static void show_csv(struct timestamp* ts, size_t count)
49 if (find_pair(start, &stop, count)) { 50 if (find_pair(start, &stop, count)) {
50 if (stop->timestamp - start->timestamp > threshold) 51 if (stop->timestamp - start->timestamp > threshold)
51 filtered++; 52 filtered++;
53 else if (start->task_type != TSK_RT && stop->task_type != TSK_RT)
54 non_rt++;
52 else { 55 else {
53 printf("%llu, %llu, %llu\n", 56 printf("%llu, %llu, %llu\n",
54 start->timestamp, stop->timestamp, 57 start->timestamp, stop->timestamp,
@@ -149,10 +152,11 @@ int main(int argc, char** argv)
149 "Skipped : %10d\n" 152 "Skipped : %10d\n"
150 "Complete : %10d\n" 153 "Complete : %10d\n"
151 "Incomplete: %10d\n" 154 "Incomplete: %10d\n"
152 "Filtered : %10d\n", 155 "Filtered : %10d\n"
156 "Non RT : %10d\n",
153 count, 157 count,
154 skipped, complete, 158 skipped, complete,
155 incomplete, filtered); 159 incomplete, filtered, non_rt);
156 160
157 return 0; 161 return 0;
158} 162}