6200 - --dump is not needed for incremental traces
This undoes commit 5764, which was ill-considered. We already had incremental prints at that point to 'last_run'. As long as we don't run out of RAM on large traces, there doesn't seem any need to print to stderr. Now '--dump' is only needed when juggling multiple traces.
This commit is contained in:
parent
35af489c74
commit
d260b01748
10
001help.cc
10
001help.cc
|
@ -81,13 +81,9 @@ void init_help() {
|
|||
"== Debugging aids\n"
|
||||
"- Add '--trace' to any of these commands to save a trace to disk at the end.\n"
|
||||
" This can run out of memory for long-running commands.\n"
|
||||
"- Add '--debug' to add information to traces. 'bootstrap --debug translate'\n"
|
||||
" will save metadata to disk that 'bootstrap --trace run' uses to make traces\n"
|
||||
" more informative.\n"
|
||||
"- Add '--dump --trace' to emit a trace incrementally to stderr.\n"
|
||||
" This approach will work even for long-running programs.\n"
|
||||
" (Though the combination of flags is counter-intuitive and can probably\n"
|
||||
" be improved.)\n"
|
||||
"- Add '--debug' to emit additional debug information during translation.\n"
|
||||
" 'bootstrap --debug translate' will save metadata to disk that\n"
|
||||
" 'bootstrap --trace run' uses to make traces more informative.\n"
|
||||
"\n"
|
||||
"Options starting with '--' must always come before any other arguments.\n"
|
||||
"\n"
|
||||
|
|
|
@ -190,8 +190,6 @@ void trace_stream::newline() {
|
|||
if (should_incrementally_print_trace()) {
|
||||
dump_trace_line(cerr, t);
|
||||
}
|
||||
// Hack: on 'bootstrap --trace --dump', emit only to stderr, not 'last_run'.
|
||||
if (Dump_trace) past_lines.pop_back(); // economize on memory
|
||||
// End trace Commit
|
||||
}
|
||||
|
||||
|
@ -458,6 +456,7 @@ else if (is_equal(*arg, "--trace")) {
|
|||
:(before "End trace Commit")
|
||||
if (Trace_file) {
|
||||
dump_trace_line(Trace_file, t);
|
||||
past_lines.pop_back(); // economize on memory
|
||||
}
|
||||
:(before "End One-time Setup")
|
||||
atexit(cleanup_main);
|
||||
|
|
|
@ -470,7 +470,7 @@ rudimentary but hopefully still workable toolkit:
|
|||
`./translate_subx_debug`, and then running:
|
||||
|
||||
```
|
||||
./bootstrap --debug --trace --dump run a.elf test 2>&1 |grep 'label test'
|
||||
./bootstrap --trace --dump run a.elf test 2>&1 |grep 'label test'
|
||||
```
|
||||
|
||||
Just read out the last test printed out before the segfault.
|
||||
|
|
|
@ -20,4 +20,5 @@ fi
|
|||
set -e
|
||||
|
||||
./translate_subx_debug init.linux $(echo $FILES) /tmp/run_one_test.subx
|
||||
CFLAGS=$CFLAGS ./bootstrap --debug --trace run a.elf
|
||||
echo running
|
||||
CFLAGS=$CFLAGS ./bootstrap --trace run a.elf
|
||||
|
|
Loading…
Reference in New Issue