diff options
Diffstat (limited to 'src/ftsort.c')
| -rw-r--r-- | src/ftsort.c | 21 |
1 files changed, 13 insertions, 8 deletions
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; |
