llvm-6502/include/llvm/CodeGen
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
..
AsmPrinter.h Get rid of postInstructionAction and call EmitComments directly. 2009-07-15 18:24:03 +00:00
BinaryObject.h "BinaryObject.h was implicitly converting between uint{16,32,64}_t to 2009-07-07 18:28:00 +00:00
BreakCriticalMachineEdge.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
CallingConvLower.h Thread LLVMContext through MVT and related parts of SDISel. 2009-07-09 17:57:24 +00:00
DAGISelHeader.h Generalize one of the SelectionDAG::ReplaceAllUsesWith overloads 2009-04-15 20:06:30 +00:00
DwarfWriter.h Revert 71165. It did more than just revert 71158 and it introduced 2009-05-07 19:46:24 +00:00
ELFRelocation.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
FastISel.h Begin the painful process of tearing apart the rat'ss nest that is Constants.cpp and ConstantFold.cpp. 2009-07-13 04:09:18 +00:00
FileWriters.h Add the Object Code Emitter class. Original patch by Aaron Gray, I did some 2009-07-06 05:09:34 +00:00
GCMetadata.h
GCMetadataPrinter.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
GCs.h
GCStrategy.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
IntrinsicLowering.h Get rid of these cache variables, which are a holdover from the days when 2009-06-26 20:33:47 +00:00
JITCodeEmitter.h Tidy up #includes. 2009-07-16 15:32:28 +00:00
LatencyPriorityQueue.h Fix some register-alias-related bugs in the post-RA scheduler liveness 2008-12-16 03:25:46 +00:00
LazyLiveness.h Remove warnings: no newline at end of file. 2009-06-10 03:42:13 +00:00
LinkAllAsmWriterComponents.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
LinkAllCodegenComponents.h Instead of passing in an unsigned value for the optimization level, use an enum, 2009-04-29 23:29:43 +00:00
LiveInterval.h Remove mismatched and unnecessary declaration. 2009-07-15 21:52:40 +00:00
LiveIntervalAnalysis.h Improved tracking of value number kills. VN kills are now represented 2009-07-09 03:57:02 +00:00
LiveStackAnalysis.h Update to in-place spilling framework. Includes live interval scaling and trivial rewriter. 2009-06-02 16:53:25 +00:00
LiveVariables.h LiveVariables::VarInfo contains an AliveBlocks BitVector, which has as many 2009-05-26 18:27:15 +00:00
MachineBasicBlock.h Tidy up #includes. 2009-07-16 15:32:28 +00:00
MachineCodeEmitter.h Add line numbers to OProfile. To do this, I added a processDebugLoc() 2009-07-16 21:07:26 +00:00
MachineCodeInfo.h Add missing file. 2009-05-18 21:08:45 +00:00
MachineConstantPool.h Use CHAR_BIT instead of hard-coding 8 in several places where it 2009-04-01 18:45:54 +00:00
MachineDominators.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
MachineFrameInfo.h Fix a bunch of Doxygen syntax issues. Escape special characters, 2009-03-03 02:55:14 +00:00
MachineFunction.h Simplify debug info intrisinc lowering. 2009-07-02 22:43:26 +00:00
MachineFunctionPass.h Add a new "available_externally" linkage type. This is intended 2009-04-13 05:44:34 +00:00
MachineInstr.h stub out some hacky code for wiring up the new asmprinter interfaces 2009-06-19 23:59:57 +00:00
MachineInstrBuilder.h add default ctor. 2009-07-09 06:44:01 +00:00
MachineJumpTableInfo.h Move MachineJumpTableInfo::ReplaceMBBInJumpTables out of line. 2009-04-15 01:18:49 +00:00
MachineLocation.h Switch the MachineOperand accessors back to the short names like 2008-10-03 15:45:36 +00:00
MachineLoopInfo.h Move isLCSSAForm, isLoopInvariant, getCanonicalInductionVariable, 2009-07-13 22:02:44 +00:00
MachineMemOperand.h
MachineModuleInfo.h Restore minor deletion. 2009-05-04 18:40:41 +00:00
MachineOperand.h Add isMetadata() to check metadata operand. 2009-07-06 23:46:02 +00:00
MachinePassRegistry.h
MachineRegisterInfo.h Part 1. 2009-06-15 08:28:29 +00:00
MachineRelocation.h Fix MachineCodeEmitter to use uintptr_t instead of intptr_t. This avoids some overflow issues. Patch by Thomas Jablin. 2008-12-10 02:32:19 +00:00
MachORelocation.h
ObjectCodeEmitter.h Just forgot to include the two new files 2009-07-06 05:16:40 +00:00
Passes.h Add a new codegen pass that normalizes dwarf exception handling 2009-05-22 20:36:31 +00:00
PseudoSourceValue.h Have PseudoSourceValue override Value::dump, so that it works 2008-12-03 21:37:21 +00:00
RegAllocRegistry.h Reformat. 2009-07-08 21:57:46 +00:00
RegisterCoalescer.h Fix a bunch of Doxygen syntax issues. Escape special characters, 2009-03-03 02:55:14 +00:00
RegisterScavenging.h Remove special handling of implicit_def. Fix a couple more bugs in liveintervalanalysis and coalescer handling of implicit_def. 2009-07-01 08:19:36 +00:00
RuntimeLibcalls.h Fixed names of libcalls checked in r73480. 2009-06-16 10:22:58 +00:00
ScheduleDAG.h Add a new bit to SUnit to record whether a node has implicit physreg 2009-03-23 16:10:52 +00:00
ScheduleHazardRecognizer.h Initial hazard recognizer support in post-pass scheduling. This includes 2009-01-16 01:33:36 +00:00
SchedulerRegistry.h Instead of passing in an unsigned value for the optimization level, use an enum, 2009-04-29 23:29:43 +00:00
SelectionDAG.h As Chris pointed out, we don't actually need to pass the context around here. 2009-07-09 18:44:09 +00:00
SelectionDAGISel.h Implement changes from Chris's feedback. 2009-07-08 20:53:28 +00:00
SelectionDAGNodes.h Make EXTRACT_VECTOR_ELT a bit more flexible in terms of the returned 2009-07-09 22:01:03 +00:00
ValueTypes.h Remove the v3i32 and v3f32 value types: they are not 2009-07-15 15:28:52 +00:00
ValueTypes.td Remove the v3i32 and v3f32 value types: they are not 2009-07-15 15:28:52 +00:00