[PATCH] D10674: Value profiling - patchset 3

Betul Buyukkurt via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 14:10:43 PDT 2015


I initially thought having a static InstrProfStringTable variable would be a good idea during merging of multiple profile files, however since destructors would not be clearing it out, the class will stay in memory in clang and in llvm (for reading data from late instrumentation), I'll revert these two changes below:
- Removed the StringTable members from indexed reader and writer and made it a static member variable in the base reader class. This helped maintain a single StringTable across all reader instances and for the indexed writer as well.
- Removed the updateStringTableReferences call from the InstrProfWriter.

-----Original Message-----
From: Betul Buyukkurt [mailto:betulb at codeaurora.org] 
Sent: Thursday, August 27, 2015 10:38 AM
To: betulb at codeaurora.org; mail at justinbogner.com; dnovillo at google.com; dsule at codeaurora.org; ibaev at codeaurora.org; davidxl at google.com
Cc: llvm-commits at lists.llvm.org
Subject: Re: [PATCH] D10674: Value profiling - patchset 3

betulb updated this revision to Diff 33338.
betulb added a comment.

In this revision:

- Removed the StringTable members from indexed reader and writer and made it a static member variable in the base reader class. This helped maintain a single StringTable across all reader instances and for the indexed writer as well.
- Removed the updateStringTableReferences call from the InstrProfWriter.
- Returned error if hash is not found in the HashKeyMap in the indexed profile file reader. Because all the strings are expected to be in the Keys of OnDiskChainedItetableHashTable, not finding a hash entry should be processed as error.
- Added debug output for hash collisions.


http://reviews.llvm.org/D10674

Files:
  include/llvm/ProfileData/InstrProf.h
  include/llvm/ProfileData/InstrProfReader.h
  include/llvm/ProfileData/InstrProfWriter.h
  lib/ProfileData/InstrProf.cpp
  lib/ProfileData/InstrProfIndexed.h
  lib/ProfileData/InstrProfReader.cpp
  lib/ProfileData/InstrProfWriter.cpp
  tools/llvm-profdata/llvm-profdata.cpp
  unittests/ProfileData/CoverageMappingTest.cpp
  unittests/ProfileData/InstrProfTest.cpp




More information about the llvm-commits mailing list