etw-stackwalk: send debug GUIDs from browser [requires perfetto change] [chromium/src : main]

2 views
Skip to first unread message

Sean Maher (Gerrit)

unread,
May 16, 2026, 9:17:19 PMMay 16
to Jesse McKenna, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Jesse McKenna

Sean Maher added 3 comments

File components/tracing/common/active_processes_win.h
Line 148, Patchset 2 (Latest): std::unordered_map<std::string, std::string> image_guids_;
Sean Maher . unresolved

if this is more than like 8 items large i think we should use a more performant map, say absl::flat_hash_map or whatever it's called

File components/tracing/common/tracing_scenarios_config.cc
Line 226, Patchset 2 (Latest): L"advapi32.dll"};
Sean Maher . unresolved

in system32: ntoskrnl.exe, dbghelp.dll, user32.dll, apphelp.dll
in chrome: libEGL.dll, libGLESv2.dll, dxil.dll, dxcompiler.dll, vulkan-1.dll, maybe also the other ones

Line 244, Patchset 2 (Latest): // ⭐⭐⭐ TODO: do we also need age? it's needed to pull symbols
Sean Maher . unresolved

are you typing these stars

Open in Gerrit

Related details

Attention is currently required from:
  • Jesse McKenna
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I721dc71274b7390000a8f9d99e7793eeb89caae7
Gerrit-Change-Number: 7793565
Gerrit-PatchSet: 2
Gerrit-Owner: Jesse McKenna <jessem...@google.com>
Gerrit-CC: Sean Maher <sp...@chromium.org>
Gerrit-Attention: Jesse McKenna <jessem...@google.com>
Gerrit-Comment-Date: Sun, 17 May 2026 01:17:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Sean Maher (Gerrit)

unread,
May 16, 2026, 9:23:32 PMMay 16
to Jesse McKenna, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Jesse McKenna

Sean Maher added 1 comment

File components/tracing/common/etw_system_data_source_win.cc
Line 162, Patchset 1: image_guids.emplace(entry.key(), entry.value());
Sean Maher . unresolved

keep in mind that these are gonna be NT kernel pathes (start with `\HardDisk0\` or whatedver)

Open in Gerrit

Related details

Attention is currently required from:
  • Jesse McKenna
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I721dc71274b7390000a8f9d99e7793eeb89caae7
Gerrit-Change-Number: 7793565
Gerrit-PatchSet: 2
Gerrit-Owner: Jesse McKenna <jessem...@google.com>
Gerrit-CC: Sean Maher <sp...@chromium.org>
Gerrit-Attention: Jesse McKenna <jessem...@google.com>
Gerrit-Comment-Date: Sun, 17 May 2026 01:23:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Jesse McKenna (Gerrit)

unread,
Jul 24, 2026, 10:01:54 PM (12 days ago) Jul 24
to Etienne Pierre-Doray, Chromium LUCI CQ, Sean Maher, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Etienne Pierre-Doray and Sean Maher

Jesse McKenna voted and added 5 comments

Votes added by Jesse McKenna

Commit-Queue+1

5 comments

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Jesse McKenna . resolved

Thank you for the comments! I've also cleaned up this CL, but there's a large point I'm still unsure on:

etiennep@ mentioned that the method in my earlier patchsets wouldn't allow the debug IDs to be added when recording from the UI. I'm not sure if this refers to `ui.perfetto.dev` or somewhere else - I've moved the logic to `AdaptPerfettoConfigForChrome`, but this is also not called when tracing from `ui.perfetto.dev`, so if we do want to make sure debug IDs are sent when recording from there, I think I'll need to move it somewhere more generic.

`ConsumerHost::EnableTracing` seems like it applies to all tracing entry points, but that class seems fairly generic so it feels awkward to pass arbitrary data from it. Let me know if you or Etienne have any thoughts. I thought it'd be worth sending this for review for now anyway so we can discuss. Thanks again!

File components/tracing/common/active_processes_win.h
Line 148, Patchset 2: std::unordered_map<std::string, std::string> image_guids_;
Sean Maher . resolved

if this is more than like 8 items large i think we should use a more performant map, say absl::flat_hash_map or whatever it's called

Jesse McKenna

Done

File components/tracing/common/etw_system_data_source_win.cc
Line 162, Patchset 1: image_guids.emplace(entry.key(), entry.value());
Sean Maher . resolved

keep in mind that these are gonna be NT kernel pathes (start with `\HardDisk0\` or whatedver)

Jesse McKenna

Done - I had the `HandleImageLoadEvent` code convert them (via `base::DevicePathToDriveLetterPath`) in https://chromium-review.git.corp.google.com/c/chromium/src/+/7794349

File components/tracing/common/tracing_scenarios_config.cc
Line 226, Patchset 2: L"advapi32.dll"};
Sean Maher . resolved

in system32: ntoskrnl.exe, dbghelp.dll, user32.dll, apphelp.dll
in chrome: libEGL.dll, libGLESv2.dll, dxil.dll, dxcompiler.dll, vulkan-1.dll, maybe also the other ones

Jesse McKenna

Done - this required doing some fallback logic because some of these DLLs won't necessarily be loaded (e.g., the graphics ones aren't loaded in the browser AFAICT).

Line 244, Patchset 2: // ⭐⭐⭐ TODO: do we also need age? it's needed to pull symbols
Sean Maher . resolved

are you typing these stars

Jesse McKenna

Yeah, I use them to highlight places I need to pay attention to, but they're not intended to be part of the final draft - removed in the latest : )

Open in Gerrit

Related details

Attention is currently required from:
  • Etienne Pierre-Doray
  • Sean Maher
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I721dc71274b7390000a8f9d99e7793eeb89caae7
    Gerrit-Change-Number: 7793565
    Gerrit-PatchSet: 6
    Gerrit-Owner: Jesse McKenna <jessem...@google.com>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Jesse McKenna <jessem...@google.com>
    Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Attention: Sean Maher <sp...@chromium.org>
    Gerrit-Comment-Date: Sat, 25 Jul 2026 02:01:44 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Sean Maher <sp...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Etienne Pierre-Doray (Gerrit)

    unread,
    Jul 30, 2026, 3:36:28 PM (7 days ago) Jul 30
    to Jesse McKenna, Code Review Nudger, Chromium LUCI CQ, Sean Maher, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
    Attention needed from Jesse McKenna and Sean Maher

    Etienne Pierre-Doray added 4 comments

    Patchset-level comments
    File-level comment, Patchset 6:
    Jesse McKenna . unresolved

    Thank you for the comments! I've also cleaned up this CL, but there's a large point I'm still unsure on:

    etiennep@ mentioned that the method in my earlier patchsets wouldn't allow the debug IDs to be added when recording from the UI. I'm not sure if this refers to `ui.perfetto.dev` or somewhere else - I've moved the logic to `AdaptPerfettoConfigForChrome`, but this is also not called when tracing from `ui.perfetto.dev`, so if we do want to make sure debug IDs are sent when recording from there, I think I'll need to move it somewhere more generic.

    `ConsumerHost::EnableTracing` seems like it applies to all tracing entry points, but that class seems fairly generic so it feels awkward to pass arbitrary data from it. Let me know if you or Etienne have any thoughts. I thought it'd be worth sending this for review for now anyway so we can discuss. Thanks again!

    Etienne Pierre-Doray

    Ya I don't think doing this in AdaptPerfettoConfigForChrome would work if recording from perfetto (but there isn't an easy way to enable etw from perfetto anyways).

    I think it'd be fine to do this in ConsumerHost::EnableTracing though.

    File components/tracing/common/active_processes_win.h
    Line 72, Patchset 7 (Latest): absl::flat_hash_map<std::string, std::string> known_debug_ids);
    Etienne Pierre-Doray . unresolved

    const flat_hash_map& ?

    File services/tracing/public/cpp/perfetto/perfetto_config.cc
    Line 224, Patchset 7 (Latest):GetStackSamplingDebugIds() {
    Etienne Pierre-Doray . unresolved

    Regarless of where we do AdaptEtwConfig, I think this should be defined in components/tracing/common/

    Line 250, Patchset 7 (Latest): auto as_debug_id = [](const GUID& guid, DWORD age) {
    auto debug_id = base::win::WStringFromGUID(guid);
    base::RemoveChars(debug_id, L"{}-", &debug_id);
    debug_id.append(base::NumberToWString(age));
    return base::WideToUTF8(debug_id);
    };
    Etienne Pierre-Doray . unresolved

    Could we reuse (or rather extract) logic from GetDebugInfoForModule()?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Jesse McKenna
    • Sean Maher
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I721dc71274b7390000a8f9d99e7793eeb89caae7
      Gerrit-Change-Number: 7793565
      Gerrit-PatchSet: 7
      Gerrit-Owner: Jesse McKenna <jessem...@google.com>
      Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
      Gerrit-Reviewer: Jesse McKenna <jessem...@google.com>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-Attention: Jesse McKenna <jessem...@google.com>
      Gerrit-Attention: Sean Maher <sp...@chromium.org>
      Gerrit-Comment-Date: Thu, 30 Jul 2026 19:36:18 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Jesse McKenna <jessem...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages