Branch: refs/heads/bbiiggppiigg/add-progress-reporting
Home: https://github.com/dyninst/dyninst
Commit: 0c615edd17b94f729ace0ed32314b5381b857957
https://github.com/dyninst/dyninst/commit/0c615edd17b94f729ace0ed32314b5381b857957
Author: wuxx1279 <bbiiggppiigg@xxxxxxxxx>
Date: 2026-06-20 (Sat, 20 Jun 2026)
Changed paths:
M dyninstAPI/src/BPatch/BPatch_binaryEdit.C
M dyninstAPI/src/Relocation/CodeBuffer.C
M dyninstAPI/src/Relocation/CodeMover.C
M dyninstAPI/src/addressSpace.C
M dyninstAPI/src/binaryEdit.C
M dyninstAPI/src/debug.C
M dyninstAPI/src/debug.h
M dyninstAPI/src/image.C
M parseAPI/src/Parser-speculative.C
Log Message:
-----------
Add DYNINST_REPORT_PROGRESS rewrite-progress reporting
Rewriting a very large binary (e.g. a multi-hundred-MB shared library)
spends long stretches in silent loops -- building reloc blocks, applying
transforms, code generation, the emit address-fixpoint, speculative gap
parsing, and assembling/emitting the output file -- so the tool can look
hung for many minutes with no output.
Add a coarse, opt-in progress channel gated on the DYNINST_REPORT_PROGRESS
environment variable (and the dyn_debug_progress flag), following the
existing debug-channel convention in debug.{h,C}. Each progress line is
prefixed with a wall-clock timestamp so phases can be timed directly from
the log.
Instrumented phases:
- CodeMover: per-function reloc-block build loop and per-RelocBlock
codegen loop (periodic counts + "codegen done").
- addressSpace::relocateInt/generateCode: phase markers (transforms,
code generation, emit address-fixpoint attempts, patching).
- CodeBuffer::generate: per-pass / periodic progress over the buffer
elements in the do/while regeneration fixpoint.
- image::analyzeImage: brackets around the (single-threaded) speculative
gap-parse phase per text region.
- BinaryEdit::writeFile / BPatch_binaryEdit::writeFile: committing
instrumentation, in-memory relocation, copying tracked regions into the
output buffer (periodic), building the symbol table, the final symtab
emit (the on-disk write), and per-dependent-library writes -- the span
from "patching jumps/springboards" through the end of writeFile.
- Parser-speculative probabilistic_gap_parsing: self-contained,
DYNINST_REPORT_PROGRESS-gated timestamped progress (parseAPI sits below
dyninstAPI and cannot use its progress channel directly). The env-var
check matches dyninstAPI's check_env_value() truthiness (set and
non-zero) so the single knob behaves identically across both layers.
No behavior change when the env var is unset.
Co-Authored-By: Claude Opus 4.8 <noreply@xxxxxxxxxxxxx>
To unsubscribe from these emails, change your notification settings at https://github.com/dyninst/dyninst/settings/notifications
|