aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ft2csv.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/ft2csv.c b/src/ft2csv.c
index dc5753b..4e3f2ad 100644
--- a/src/ft2csv.c
+++ b/src/ft2csv.c
@@ -9,8 +9,9 @@
9 9
10static unsigned int incomplete = 0; 10static unsigned int incomplete = 0;
11static unsigned int filtered = 0; 11static unsigned int filtered = 0;
12static unsigned int skipped = 0;
12 13
13static unsigned long long threshold = 2700 * 100; 14static unsigned long long threshold = 2700 * 1000; /* 1 ms == 1 full tick */
14 15
15static struct timestamp* next(struct timestamp** pos, size_t* count, int cpu) 16static struct timestamp* next(struct timestamp** pos, size_t* count, int cpu)
16{ 17{
@@ -74,6 +75,12 @@ static void show_csv(struct timestamp* ts, size_t count)
74 75
75static void show_id(struct timestamp* ts, size_t count, unsigned long id) 76static void show_id(struct timestamp* ts, size_t count, unsigned long id)
76{ 77{
78 while (ts->event != id + 1 && count--) {
79 skipped++;
80 ts++;
81 }
82 if (!count)
83 return;
77 while (count--) 84 while (count--)
78 if (ts->event == id) 85 if (ts->event == id)
79 show_csv(ts++, count); 86 show_csv(ts++, count);
@@ -117,10 +124,11 @@ int main(int argc, char** argv)
117 124
118 show_id(ts, count, id); 125 show_id(ts, count, id);
119 126
120 fprintf(stderr, 127 fprintf(stderr,
128 "Skipped : %d\n"
121 "Incomplete: %d\n" 129 "Incomplete: %d\n"
122 "Filtered : %d\n", 130 "Filtered : %d\n",
123 incomplete, filtered); 131 skipped, incomplete, filtered);
124 132
125 return 0; 133 return 0;
126} 134}