heapprofd: remove Client.FreePage nesting, and try to make names more consistent
Mostly a follow-up to the following comment thread:
https://android-review.git.corp.google.com/c/platform/external/perfetto/+/915280/10/src/profiling/memory/client.h#49
Primary renames:
FreeMetadata -> FreeBatch
kFreePageSize -> kFreeBatchSize
FreePageEntry -> FreeBatchEntry
Note that while I renamed FreeMetadata -> FreeBatch, I kept AllocMetadata (see
wire_protocol.h). I think this is still clearer than before, but open to
discussion.
Bonus: drive-by fixes because presubmit turnaround times make small patches painful.
Change-Id: Id34a785973b36279fce8cea56d2934bbe71f6741
diff --git a/src/profiling/memory/wire_protocol.cc b/src/profiling/memory/wire_protocol.cc
index 22065fc..8c71fcb 100644
--- a/src/profiling/memory/wire_protocol.cc
+++ b/src/profiling/memory/wire_protocol.cc
@@ -128,7 +128,7 @@
}
out->payload_size = static_cast<size_t>(end - buf);
} else if (*record_type == RecordType::Free) {
- if (!ViewAndAdvance<FreeMetadata>(&buf, &out->free_header, end)) {
+ if (!ViewAndAdvance<FreeBatch>(&buf, &out->free_header, end)) {
PERFETTO_DFATAL("Cannot read free header.");
return false;
}