[llvm] [memprof] Add YAML read/write support to llvm-profdata (PR #118915)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 6 08:19:10 PST 2024
================
@@ -213,6 +213,21 @@ class RawMemProfReader final : public MemProfReader {
class YAMLMemProfReader final : public MemProfReader {
public:
YAMLMemProfReader() = default;
+
+ // Return true if the \p DataBuffer starts with magic bytes indicating it is
+ // a raw binary memprof profile.
+ static bool hasFormat(const MemoryBuffer &DataBuffer);
+ // Return true if the file at \p Path starts with magic bytes indicating it is
+ // a raw binary memprof profile.
+ static bool hasFormat(const StringRef Path);
+
+ // Create a RawMemProfReader after sanity checking the contents of the file at
+ // \p Path or the \p Buffer. The binary from which the profile has been
+ // collected is specified via a path in \p ProfiledBinary.
----------------
teresajohnson wrote:
What is ProfiledBinary? That seems to be a parameter elsewhere, not here.
https://github.com/llvm/llvm-project/pull/118915
More information about the llvm-commits
mailing list