summaryrefslogtreecommitdiff
path: root/docs/UsersManual.rst
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2014-04-23 15:21:21 +0000
committerDiego Novillo <dnovillo@google.com>2014-04-23 15:21:21 +0000
commitebb76662bed11638e10fed222d512cbc40e17db4 (patch)
treedb2ef1802e173f88efd57e8602279d33bc627fb3 /docs/UsersManual.rst
parentd6d7a5d1f65b1fecbd86e283aae907a2a41bcefb (diff)
downloadclang-ebb76662bed11638e10fed222d512cbc40e17db4.tar.gz
clang-ebb76662bed11638e10fed222d512cbc40e17db4.tar.bz2
clang-ebb76662bed11638e10fed222d512cbc40e17db4.tar.xz
Review feedback.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206996 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/UsersManual.rst')
-rw-r--r--docs/UsersManual.rst13
1 files changed, 11 insertions, 2 deletions
diff --git a/docs/UsersManual.rst b/docs/UsersManual.rst
index 2ea0f7b577..acf576317c 100644
--- a/docs/UsersManual.rst
+++ b/docs/UsersManual.rst
@@ -1180,11 +1180,20 @@ a. Source line offset. This number represents the line number
defined. So, if the function has its header at line 280, the offset
13 is at line 293 in the file.
+ Note that this offset should never be a negative number. This could
+ happen in cases like macros. The debug machinery will register the
+ line number at the point of macro expansion. So, if the macro was
+ expanded in a line before the start of the function, the profile
+ converter should emit a 0 as the offset (this means that the optimizers
+ will not be able to associate a meaningful weight to the instructions
+ in the macro).
+
b. [OPTIONAL] Discriminator. This is used if the sampled program
was compiled with DWARF discriminator support
(http://wiki.dwarfstd.org/index.php?title=Path_Discriminators).
- DWARF discriminators allow the compiler to distinguish between
- multiple execution paths on the same source line location.
+ DWARF discriminators are unsigned integer values that allow the
+ compiler to distinguish between multiple execution paths on the
+ same source line location.
For example, consider the line of code ``if (cond) foo(); else bar();``.
If the predicate ``cond`` is true 80% of the time, then the edge