一句话:提出静态的日志中心叠加层,构建日志语句图并提升为方法级 Log-enabled Call Graph,为日志驱动的程序理解提供更小、以可观测性对齐的导航界面。
方法调用图(MCG)有助于程序理解,但往往规模过大,且与以日志为线索的工作流不匹配。本文提出一种静态的、以日志为中心的叠加层:先构建日志语句图(Log Statement Graph, LSG),再将其提升为方法级的 Log-enabled Call Graph(LCG),同时保留指回底层 MCG 的链接,以便按需展开更深层的调用结构。作者以 Hadoop HDFS 为案例进行研究,LCG 相比 MCG 显著更小:方法数 2,916 对 33,277,边数 304 对 29,092,跨类边更是从 20,484 降至 14。保留性分析显示,LCG 的连通性排名与 MCG 排名差异很大(top-k 几乎不重叠、秩相关性很弱),说明 LCG 提供的是一种正交的、与可观测性对齐的结构视图。作者将 LCG 定位为日志驱动理解的实用导航界面,并在需要更深调用结构时由 MCG 补充。
Method call graphs (MCGs) are useful for program comprehension but are often too large and not aligned with log-driven workflows. We propose a static, log-centric overlay that builds a Log Statement Graph (LSG) and lifts it to a method-level Log-enabled Call Graph (LCG), while remaining linkable back to the underlying MCG for expansion. In a Hadoop HDFS case study, the LCG is dramatically smaller than the MCG (33,277 vs. 2,916 methods; 29,092 vs. 304 edges) and has far fewer cross-class edges (20,484 vs. 14). A retention analysis shows LCG connectivity rankings differ substantially from MCG rankings (near-zero top-k overlap; weak rank correlation), indicating the LCG provides an orthogonal, observability-aligned view of structure. We position LCG as a practical navigation surface for log-driven comprehension, complemented by the MCG when deeper call structure is required.