[LLVMbugs] [Bug 20306] New: Inconsistent function identifiers in GCOV notes / data

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jul 15 03:00:48 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20306

            Bug ID: 20306
           Summary: Inconsistent function identifiers in GCOV notes / data
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: jonas.wagner at epfl.ch
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12765
  --> http://llvm.org/bugs/attachment.cgi?id=12765&action=edit
Patch: Use correct function identity in GCOV writeout.

The code in lib/Transforms/Instrumentation/GCOVProfiling.cpp creates both GCOV
note (.gcno) and GCOV data (.gcda) files. The content of these must be in sync
for the files to be parsed correctly.

Currently, there is a problem when generating function identifiers. These are
increasing numbers. While generating .gcno, numbers can be skipped if functions
are excluded from profiling. On the other hand, the .gcda code assumes that the
numbers are consecutive.

Attached is one patch that fixes the issue for the case where .gcno and .gcda
are generated simultaneously. I'm unsure if this is the best solution;
alternatively, we could just force function identifiers to be consecutive. On
the other hand, it seems as if it is assumed that .gcno and .gcda files are
always generated together (e.g., lib/IR/GCOV.cpp aborts if checksums don't
match, and they won't unless .gcno and .gcda are generated together), so maybe
this should be the only supported case?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140715/89ccc5f7/attachment.html>


More information about the llvm-bugs mailing list