llvm-6502/include/llvm/Support
Jeffrey Yasskin 32360a7e21 Add line numbers to OProfile. To do this, I added a processDebugLoc()
call to the MachineCodeEmitter interface and made copying the start
line of a function not conditional on whether we're emitting Dwarf
debug information. I'll propagate the processDebugLoc() calls to the
non-X86 targets in a followup patch.

In the long run, it'll probably be better to gather this information
through the DwarfWriter, but the DwarfWriter currently depends on the
AsmPrinter and TargetAsmInfo, and fixing that would be out of the way
for this patch.

There's a bug in OProfile 0.9.4 that makes it ignore line numbers for
addresses above 4G, and a patch fixing it at
http://thread.gmane.org/gmane.linux.oprofile/7634

Sample output:

$ sudo opcontrol --reset; sudo opcontrol --start-daemon; sudo opcontrol --start; `pwd`/Debug/bin/lli fib.bc; sudo opcontrol --stop
Signalling daemon... done
Profiler running.
fib(40) == 165580141
Stopping profiling.

$ opreport -g -d -l `pwd`/Debug/bin/lli|head -60
Overflow stats not available
CPU: Core 2, speed 1998 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 100000
vma      samples  %        linenr info                 image name               symbol name
00007f67a30370b0 25489    61.2554  fib.c:24                    10946.jo                 fib_left
  00007f67a30370b0 1634      6.4106  fib.c:24
  00007f67a30370b1 83        0.3256  fib.c:24
  00007f67a30370b9 1997      7.8348  fib.c:24
  00007f67a30370c6 2080      8.1604  fib.c:27
  00007f67a30370c8 988       3.8762  fib.c:27
  00007f67a30370cd 1315      5.1591  fib.c:27
  00007f67a30370cf 251       0.9847  fib.c:27
  00007f67a30370d3 1191      4.6726  fib.c:27
  00007f67a30370d6 975       3.8252  fib.c:27
  00007f67a30370db 1010      3.9625  fib.c:27
  00007f67a30370dd 242       0.9494  fib.c:27
  00007f67a30370e1 2782     10.9145  fib.c:28
  00007f67a30370e5 3768     14.7828  fib.c:28
  00007f67a30370eb 615       2.4128  (no location information)
  00007f67a30370f3 6558     25.7287  (no location information)
00007f67a3037100 15603    37.4973  fib.c:29                    10946.jo                 fib_right
  00007f67a3037100 1646     10.5493  fib.c:29
  00007f67a3037101 45        0.2884  fib.c:29
  00007f67a3037109 2372     15.2022  fib.c:29
  00007f67a3037116 2234     14.3178  fib.c:32
  00007f67a3037118 612       3.9223  fib.c:32
  00007f67a303711d 622       3.9864  fib.c:32
  00007f67a303711f 385       2.4675  fib.c:32
  00007f67a3037123 404       2.5892  fib.c:32
  00007f67a3037126 634       4.0633  fib.c:32
  00007f67a303712b 870       5.5759  fib.c:32
  00007f67a303712d 62        0.3974  fib.c:32
  00007f67a3037131 1848     11.8439  fib.c:33
  00007f67a3037135 2840     18.2016  fib.c:33
  00007f67a303713a 1         0.0064  fib.c:33
  00007f67a303713b 1023      6.5564  (no location information)
  00007f67a3037143 5         0.0320  (no location information)
000000000080c1e4 15        0.0360  MachineOperand.h:150        lli                      llvm::MachineOperand::isReg() const
  000000000080c1e4 6        40.0000  MachineOperand.h:150
  000000000080c1ec 2        13.3333  MachineOperand.h:150
...



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76102 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 21:07:26 +00:00
..
AIXDataTypesFix.h
AlignOf.h Removed trailing whitespace. 2009-02-20 22:51:36 +00:00
Allocator.h Changed Allocate to use size_t instead of unsigned. 2009-03-10 23:48:49 +00:00
Annotation.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
CallSite.h Revert r66920. It was causing failures in the self-hosting buildbot (in release 2009-03-13 21:15:59 +00:00
Casting.h Roll back rev 59890, since Chris says this can never happen. 2008-11-23 19:22:48 +00:00
CFG.h
CommandLine.h Fix comment. 2009-06-17 03:10:10 +00:00
Compiler.h Introduce new error handling API. 2009-07-07 17:32:34 +00:00
ConstantFolder.h Finish pushing LLVMContext through the IRBuilder/ConstantFolder interface. 2009-07-10 00:49:53 +00:00
ConstantRange.h Make this clearer for the mathematically inclined. Thanks to Duncan Sands for 2009-07-12 05:44:08 +00:00
DataFlow.h Make dataflow iteration possible on Value*, not only on User*: df_ext_iterator<Value*, SmallPtrSet<const Value*, 16> > 2009-04-30 17:09:22 +00:00
DataTypes.h.cmake CMake: Sync'ed DataTypes.h.cmake with DataTypes.h.in. 2008-10-25 03:25:11 +00:00
DataTypes.h.in Revert r58411. The user needs to #define this when using the JITMemoryManager.h header. 2008-10-30 01:22:58 +00:00
Debug.h Removed trailing whitespace. 2009-02-20 22:51:36 +00:00
DebugLoc.h Add line numbers to OProfile. To do this, I added a processDebugLoc() 2009-07-16 21:07:26 +00:00
DOTGraphTraits.h Get rid of the global CFGOnly flag by threading a ShortNames parameters through the GraphViz rendering code. 2009-06-24 17:37:09 +00:00
Dwarf.h Add DW_AT_APPLE_isa and DW_AT_APPLE_block. Radar 6867696 2009-05-11 21:58:01 +00:00
DynamicLinker.h
ELF.h Add AMD64 elf machine type 2009-05-30 21:05:47 +00:00
ErrorHandling.h llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable. 2009-07-14 16:55:14 +00:00
FileUtilities.h Removed trailing whitespace. 2009-02-20 22:51:36 +00:00
Format.h Add C++ marker. 2009-03-10 15:56:48 +00:00
FormattedStream.h Use setStream infomatted_raw_ostream's constructor, to reduce code 2009-07-16 15:37:26 +00:00
GetElementPtrTypeIterator.h
GraphWriter.h Add support for other GraphViz display tools. This can help 2009-07-09 17:06:18 +00:00
InstIterator.h
InstVisitor.h Clean up some comments. 2009-07-15 22:43:51 +00:00
IRBuilder.h Revert yesterday's change by removing the LLVMContext parameter to AllocaInst and MallocInst. 2009-07-15 23:53:25 +00:00
LeakDetector.h
ManagedStatic.h Resolve undefined behaviour when ManagedStatic is instantiated with a fixed-length array type. 2009-07-09 17:26:16 +00:00
Mangler.h eliminate the Mangler::PreserveAsmNames bit, the sole client of this 2009-07-15 04:50:47 +00:00
MathExtras.h Fix the name of the function in this comment. 2009-05-31 16:18:03 +00:00
MemoryBuffer.h Removed trailing whitespace. 2009-02-20 22:51:36 +00:00
MutexGuard.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
NoFolder.h Push LLVMContext through the PatternMatch API. 2009-07-10 17:35:01 +00:00
OutputBuffer.h Simple ELF32/64 binary files can now be emitted for x86 and x86_64 without 2009-06-07 21:22:38 +00:00
PassNameParser.h llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable. 2009-07-14 16:55:14 +00:00
PatternMatch.h Fix obvious typo. 2009-07-14 00:09:42 +00:00
PluginLoader.h
PointerLikeTypeTraits.h Drop the default assumption about alignment down to 2 bits from 3. This apparently 2009-05-01 23:48:33 +00:00
PredIteratorCache.h Add caching of predecessor counts as well as predecessors themselves. 2009-04-22 08:46:33 +00:00
PrettyStackTrace.h add a knob to turn off PrettyStackTrace globally. Patch by Zoltan 2009-07-16 06:17:45 +00:00
raw_ostream.h Add explicit keywords. 2009-07-16 15:33:04 +00:00
Recycler.h ooops, forgot to include the pointless-write eliminator in my previous checkin 2009-03-04 21:54:31 +00:00
RecyclingAllocator.h Fold the useful features of alist and alist_node into ilist, and 2008-07-28 21:51:04 +00:00
Registry.h Registry.h should not depend on CommandLine.h. 2009-01-16 07:02:28 +00:00
RegistryParser.h Registry.h should not depend on CommandLine.h. 2009-01-16 07:02:28 +00:00
SlowOperationInformer.h
SourceMgr.h switch the .ll parser to use SourceMgr. 2009-07-02 23:08:13 +00:00
StableBasicBlockNumbering.h
StandardPasses.h Disable loop index split for now and let nightly tester verify its usefulness. 2009-07-07 22:09:42 +00:00
Streams.h Removed trailing whitespace. 2009-02-20 22:51:36 +00:00
StringPool.h Removed trailing whitespace. 2009-02-20 22:51:36 +00:00
SystemUtils.h Add a raw_ostream version of CheckBitcodeOutputToConsole. 2009-07-15 17:04:50 +00:00
TargetFolder.h Finish pushing LLVMContext through the IRBuilder/ConstantFolder interface. 2009-07-10 00:49:53 +00:00
Timer.h Make timers threadsafe again. This isn't quite as nice as I'd hoped (it uses locking rather than atomic arithmetic), 2009-06-23 20:52:29 +00:00
type_traits.h
TypeBuilder.h Fix unit tests. 2009-07-10 18:58:29 +00:00
ValueHandle.h Add simplify_type specializations to allow WeakVH, AssertingVH, and 2009-05-06 17:12:48 +00:00