[all-commits] [llvm/llvm-project] edf733: [memprof] Take Schema into account in PortableMemI...
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Tue Apr 23 13:44:53 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: edf733bc321d6e2d0a7dae04ef78d6b291f14a55
https://github.com/llvm/llvm-project/commit/edf733bc321d6e2d0a7dae04ef78d6b291f14a55
Author: Kazu Hirata <kazu at google.com>
Date: 2024-04-23 (Tue, 23 Apr 2024)
Changed paths:
M llvm/include/llvm/ProfileData/MemProf.h
M llvm/lib/ProfileData/MemProf.cpp
Log Message:
-----------
[memprof] Take Schema into account in PortableMemInfoBlock::serializedSize (#89824)
PortableMemInfoBlock::{serialize,deserialize} take Schema into
account, allowing us to serialize/deserialize a subset of the fields.
However, PortableMemInfoBlock::serializedSize does not. That is, it
assumes that all fields are always serialized and deserialized. In
other words, if we choose to serialize/deserialize a subset of the
fields, serializedSize would claim more storage than we actually need.
This patch fixes the problem by teaching serializedSize to take Schema
into account. For now, this patch has no effect on the actual indexed
MemProf profile because we serialize/deserialize all fields, but that
might change in the future.
Aside from check-llvm, I tested this patch by verifying that
llvm-profdata generates bit-wise identical files for each version for
a large raw MemProf file I have.
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