[all-commits] [llvm/llvm-project] 9040dd: [memprof] Improve the way we express Frames in YAM...
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Wed Dec 11 17:58:46 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9040dd469d61f59235ba5d2ef2c05e661159f877
https://github.com/llvm/llvm-project/commit/9040dd469d61f59235ba5d2ef2c05e661159f877
Author: Kazu Hirata <kazu at google.com>
Date: 2024-12-11 (Wed, 11 Dec 2024)
Changed paths:
M llvm/include/llvm/ProfileData/MemProfYAML.h
M llvm/test/tools/llvm-profdata/memprof-yaml.test
M llvm/tools/llvm-profdata/llvm-profdata.cpp
M llvm/unittests/ProfileData/MemProfTest.cpp
Log Message:
-----------
[memprof] Improve the way we express Frames in YAML (#119629)
This patch does two things:
- During deserialization, we accept a function name for Frame as an
alternative to the usual GUID expressed as a hexadecimal number.
- During serialization, we print a GUID of Frame as a 16-digit
hexadecimal number prefixed with 0x in the usual way. (Without this
patch, we print a decimal number, which is not customary.)
The patch uses a machinery called "normalization" in YAML I/O, which
lets us serialize and deserialize into an alternative data structure.
For our use case, we have an alternative Frame data structure, which
is identical to "struct Frame" except that Function is of type
GUIDHex64 instead of GlobalValue::GUID. This alternative type
supports the two bullet points above without modifying "struct Frame"
at all.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list