This is an archive of the discontinued LLVM Phabricator instance.

[BOLT][NFC] Simplify debug logging in case of JT heuristic failure
ClosedPublic

Authored by Amir on Aug 4 2022, 11:39 PM.

Details

Summary

Move logging into LLVM_DEBUG scope.
Remove redundant printing of jump table parents:

Old logging:

failed to analyze jump table in function _ZN12_GLOBAL__N_116InitHeaderSearch23Ad
dDefaultCIncludePathsERKN4llvm6TripleERKN5clang19HeaderSearchOptionsE/1(*2)
PIC Jump table JUMP_TABLE/_ZN12_GLOBAL__N_116InitHeaderSearch23AddDefaultCInclud
ePathsERKN4llvm6TripleERKN5clang19HeaderSearchOptionsE/1.1 for function _ZN12_GL
OBAL__N_116InitHeaderSearch23AddDefaultCIncludePathsERKN4llvm6TripleERKN5clang19
HeaderSearchOptionsE/1(*2) at 0x65996e0 with a total count of 0:
  0x9dc

next jump table at 0x659a810 belongs to function _ZN5clang5Lexer40LexDependencyD
irectiveTokenWhileSkippingERNS_5TokenE
PIC Jump table JUMP_TABLE/_ZN5clang5Lexer40LexDependencyDirectiveTokenWhileSkipp
ingERNS_5TokenE.0 for function _ZN5clang5Lexer40LexDependencyDirectiveTokenWhile
SkippingERNS_5TokenE at 0x659a810 with a total count of 0:

jump table heuristic failure

New logging:

failed to analyze PIC Jump table JUMP_TABLE/_ZN12_GLOBAL__N_116InitHeaderSearch2
3AddDefaultCIncludePathsERKN4llvm6TripleERKN5clang19HeaderSearchOptionsE/1.1 for
function _ZN12_GLOBAL__N_116InitHeaderSearch23AddDefaultCIncludePathsERKN4llvm6T
ripleERKN5clang19HeaderSearchOptionsE/1(*2) at 0x65996e0 with a total count of 0:
  absolute offset: 0x52ac58c

next PIC Jump table JUMP_TABLE/_ZN5clang5Lexer40LexDependencyDirectiveTokenWhile
SkippingERNS_5TokenE.0 for function _ZN5clang5Lexer40LexDependencyDirectiveToken
WhileSkippingERNS_5TokenE at 0x659a810 with a total count of 0:

jump table heuristic failure

Diff Detail

Event Timeline

Amir created this revision.Aug 4 2022, 11:39 PM
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: ayermolo. · View Herald Transcript
Amir requested review of this revision.Aug 4 2022, 11:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2022, 11:39 PM
Amir edited the summary of this revision. (Show Details)Aug 4 2022, 11:40 PM
Amir added a reviewer: nhuhuan.
Amir edited the summary of this revision. (Show Details)Aug 4 2022, 11:58 PM
Amir edited the summary of this revision. (Show Details)Aug 5 2022, 12:00 AM
Amir edited the summary of this revision. (Show Details)Aug 5 2022, 9:33 AM
rafauler accepted this revision.Aug 5 2022, 4:43 PM
This revision is now accepted and ready to land.Aug 5 2022, 4:43 PM