This is an archive of the discontinued LLVM Phabricator instance.

[Support] Use newer thread naming API if available on Windows.
Needs ReviewPublic

Authored by scotttodd on Mar 31 2023, 3:52 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

See https://learn.microsoft.com/en-us/visualstudio/debugger/how-to-set-a-thread-name-in-native-code. The newer API allows for performance analysis tools (such as Tracy) that don't use the debugger API to still view thread names.

Diff Detail

Event Timeline

scotttodd created this revision.Mar 31 2023, 3:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 31 2023, 3:52 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
scotttodd requested review of this revision.Mar 31 2023, 3:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 31 2023, 3:52 PM
scotttodd added inline comments.Apr 3 2023, 12:55 PM
llvm/lib/Support/Windows/Threading.inc
120–128