Sample profiles - Re-arrange binary format to emit head samples only on top functions.
authorDiego Novillo <dnovillo@google.com>
Fri, 16 Oct 2015 18:54:35 +0000 (18:54 +0000)
committerDiego Novillo <dnovillo@google.com>
Fri, 16 Oct 2015 18:54:35 +0000 (18:54 +0000)
commit9dc572f568d55568174020218d3b939c1ba8d102
treef8f4f9e0d1579ac797a6293a65b7dc99faa2f220
parentd433cde1a1f80974d35284fc47b7dc3a6c5f6684
Sample profiles - Re-arrange binary format to emit head samples only on top functions.

The number of samples collected at the head of a function only make
sense for top-level functions (i.e., those actually called as opposed to
being inlined inside another).

Head samples essentially count the time spent inside the function's
prologue.  This clearly doesn't make sense for inlined functions, so we
were always emitting 0 in those.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250539 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ProfileData/SampleProf.h
include/llvm/ProfileData/SampleProfReader.h
include/llvm/ProfileData/SampleProfWriter.h
lib/ProfileData/SampleProfReader.cpp
lib/ProfileData/SampleProfWriter.cpp
test/Transforms/SampleProfile/Inputs/fnptr.binprof