[compiler-rt] [sanitizer_symbolizer] Symbolizer Markup for linux. (PR #65543)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 17:28:49 PDT 2023


================
@@ -248,6 +248,44 @@ static void PrintStackAllocations(StackAllocationsRingBuffer *sa,
     if (SymbolizedStack *frame = Symbolizer::GetOrInit()->SymbolizePC(pc)) {
       RenderFrame(&frame_desc, " %F %L", 0, frame->info.address, &frame->info,
                   common_flags()->symbolize_vs_style,
+                  common_flags()->enable_symbolizer_markup,
+                  common_flags()->strip_path_prefix);
+      frame->ClearAll();
+    }
+    Printf("%s\n", frame_desc.data());
+    frame_desc.clear();
+  }
+}
+
+
+static void PrintStackAllocationsMarkup(StackAllocationsRingBuffer *sa) {
+  // For symbolizer markup it is just necessary to have dump stack
+  // frames for offline symbolization.
+
+  uptr frames = Min((uptr)flags()->stack_history_size, sa->size());
+  if (const ListOfModules *modules =
+          Symbolizer::GetOrInit()->GetRefreshedListOfModules()) {
+    InternalScopedString modules_res;
+    RenderModules(&modules_res, modules,
----------------
vitalybuka wrote:

Looks like RenderModules is unrelated change.
Can you please extract into a separate patch with justification and tests?

https://github.com/llvm/llvm-project/pull/65543


More information about the llvm-commits mailing list