diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-09-10 03:09:50 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-10-19 16:54:29 -0400 |
commit | 23624a2fd62515146c0eace874583fb66586de4c (patch) | |
tree | 24d25afb94af510f8d0d843c9ef3e168634490d1 | |
parent | 861b556c5a9867f2abe600901cbf3054195377c1 (diff) |
- Don't enforce sequentiality constraint on SEND_RESCHED samples.
- Refuse samples with negative time deltas (possible due to clock skew).
-rw-r--r-- | src/ft2csv.c | 2 | ||||
-rw-r--r-- | src/ftsort.c | 21 |
2 files changed, 14 insertions, 9 deletions
diff --git a/src/ft2csv.c b/src/ft2csv.c index d8e8e95..6a0402d 100644 --- a/src/ft2csv.c +++ b/src/ft2csv.c | |||
@@ -289,7 +289,7 @@ static void find_event_by_eid(struct timestamp *first, struct timestamp* end) | |||
289 | int interrupted = 0; | 289 | int interrupted = 0; |
290 | 290 | ||
291 | second = find_second_ts(first, end, &interrupted); | 291 | second = find_second_ts(first, end, &interrupted); |
292 | if (second) { | 292 | if (second && second->timestamp > first->timestamp) { |
293 | exec_time = second->timestamp - first->timestamp; | 293 | exec_time = second->timestamp - first->timestamp; |
294 | if (first->task_type != TSK_RT && | 294 | if (first->task_type != TSK_RT && |
295 | second->task_type != TSK_RT && !want_best_effort) | 295 | second->task_type != TSK_RT && !want_best_effort) |
diff --git a/src/ftsort.c b/src/ftsort.c index 42717fe..8ba0114 100644 --- a/src/ftsort.c +++ b/src/ftsort.c | |||
@@ -134,17 +134,21 @@ static void move_record(struct timestamp* target, struct timestamp* pos) | |||
134 | /* Refuse to violate task and CPU sequentiality: since CPUs and | 134 | /* Refuse to violate task and CPU sequentiality: since CPUs and |
135 | * tasks execute sequentially, it makes no sense to move a | 135 | * tasks execute sequentially, it makes no sense to move a |
136 | * timestamp before something recorded by the same task or | 136 | * timestamp before something recorded by the same task or |
137 | * CPU. */ | 137 | * CPU. Exception: TS_SEND_RESCHED_START is actually recorded |
138 | if (prev->cpu == pos->cpu || | 138 | * on a different CPU, so it is not subject to sequentiality |
139 | prev->pid == pos->pid) { | 139 | * constraints.*/ |
140 | if (prev->event != TS_SEND_RESCHED_START && | ||
141 | pos->event != TS_SEND_RESCHED_START && | ||
142 | (prev->cpu == pos->cpu || | ||
143 | (prev->pid == pos->pid && pos->pid != 0))) { | ||
140 | /* Bail out before we cause more disturbance to the | 144 | /* Bail out before we cause more disturbance to the |
141 | * stream. */ | 145 | * stream. */ |
142 | aborted_moves++; | 146 | aborted_moves++; |
143 | if (want_verbose) | 147 | if (want_verbose) |
144 | printf("Sequentiality constraint: " | 148 | printf("Sequentiality constraint:\n" |
145 | "<ev:%s seq:%u pid:%u cpu:%u at %llu> " | 149 | "\t<ev:%s seq:%u pid:%u cpu:%u at %llu>\n" |
146 | "must come before " | 150 | "\tmust come before\n" |
147 | "<ev:%s seq:%u pid:%u cpu:%u at %llu>\n", | 151 | "\t<ev:%s seq:%u pid:%u cpu:%u at %llu>\n", |
148 | event2str(prev->event), | 152 | event2str(prev->event), |
149 | prev->seq_no, prev->pid, prev->cpu, | 153 | prev->seq_no, prev->pid, prev->cpu, |
150 | (unsigned long long) prev->timestamp, | 154 | (unsigned long long) prev->timestamp, |
@@ -213,7 +217,8 @@ static void pre_check_cpu_monotonicity(struct timestamp *start, | |||
213 | prev[i] = pos[i] = NULL; | 217 | prev[i] = pos[i] = NULL; |
214 | 218 | ||
215 | for (next = start; next < end; next++) { | 219 | for (next = start; next < end; next++) { |
216 | if (next->event >= SINGLE_RECORDS_RANGE) | 220 | if (next->event >= SINGLE_RECORDS_RANGE || |
221 | next->event == TS_SEND_RESCHED_START) | ||
217 | continue; | 222 | continue; |
218 | 223 | ||
219 | outlier = 0; | 224 | outlier = 0; |