Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#6299: Collapse redundant entries in schedule files (#6301)
Before, we wrote out a schedule file record for every timestamp. But for scheduling we only need to know the thread switch points, so consecutive same-thread records are superfluous. This will only get worse with more timestamps from #6290. Here we collapse consecutive same-thread entries in both the serial and cpu schedule files, and update the invariant checker to allow either the old or new type of file. On simple_app, before (2nd column is tid): ``` $ zcat drmemtrace.*.dir/trace/serial* | od -t d8 -A d -w32 | tail 0002464 1484994 13338489228331182 3 112619 0002496 1484994 13338489228331508 3 112619 0002528 1484994 13338489228337025 3 112886 0002560 1484994 13338489228337031 3 112886 0002592 1484994 13338489228360665 3 113878 0002624 1484994 13338489228360692 3 113878 0002656 1484994 13338489228437577 3 116138 0002688 1484994 13338489228437586 3 116138 0002720 1484994 13338489228520213 3 118090 0002752 $ unzip -p drmemtrace.*.dir/trace/cpu*.zip 3 | od -t d8 -A d -w32 | tail 000520 1484994 13338489228331182 3 112619 000540 1484994 13338489228331508 3 112619 000560 1484994 13338489228337025 3 112886 000580 1484994 13338489228337031 3 112886 0005a0 1484994 13338489228360665 3 113878 0005c0 1484994 13338489228360692 3 113878 0005e0 1484994 13338489228437577 3 116138 000600 1484994 13338489228437586 3 116138 000620 1484994 13338489228520213 3 118090 000640 ``` After: ``` $ zcat drmemtrace.*.dir/trace/serial* | od -t d8 -A d -w32 | tail 0000000 1873100 13338569448213406 1 0 0000032 $ unzip -p drmemtrace.*.dir/trace/cpu*.zip 1 | od -t d8 -A x -w32 | tail 000000 1873100 13338569448213406 1 0 000020 ``` Fixes #6299
- Loading branch information