You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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.
0 commit comments