[llvm] [memprof] Reduce schema for Version2 (PR #89876)

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 09:26:31 PDT 2024


================
@@ -563,7 +565,11 @@ static Error writeMemProfV2(
   OS.write(0ULL); // Reserve space for the memprof call stack payload offset.
   OS.write(0ULL); // Reserve space for the memprof call stack table offset.
 
-  auto Schema = memprof::PortableMemInfoBlock::getSchema();
+  memprof::MemProfSchema Schema;
----------------
snehasish wrote:

nit: Just initialize with the one we want and then override.
```
memprof::MemProfSchema Schema = memprof::PortableMemInfoBlock::getHotColdSchema();
if (MemProfFullSchema)
  Schema = memprof::PortableMemInfoBlock::getFullSchema();
```

https://github.com/llvm/llvm-project/pull/89876


More information about the llvm-commits mailing list