llvm-6502/include/llvm
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
..
ADT Fix a fixme, patch by Ryan Flynn! 2009-07-15 00:36:04 +00:00
Analysis Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a number of issues in 2009-07-16 18:04:31 +00:00
Assembly switch the .ll parser into SMDiagnostic. 2009-07-02 22:46:18 +00:00
Bitcode Remove the vicmp and vfcmp instructions. Because we never had a release with 2009-07-08 03:04:38 +00:00
CodeGen Add line numbers to OProfile. To do this, I added a processDebugLoc() 2009-07-16 21:07:26 +00:00
CompilerDriver Add a -t="dir" option to the driver. This can be used to specify the directory to be used as TempDir if somebody doesn't want to use the standard /tmp. 2009-07-09 08:23:38 +00:00
Config LLVM doesn't use libelf. Remove libelf configurey. 2009-07-14 18:06:25 +00:00
Debugger Match declaration to definition. 2009-07-12 23:50:34 +00:00
ExecutionEngine Add line numbers to OProfile. To do this, I added a processDebugLoc() 2009-07-16 21:07:26 +00:00
MC Removed the SubsectionsViaSymbols MCStreamer API and replaced it with a generic 2009-07-16 17:56:39 +00:00
Support Add line numbers to OProfile. To do this, I added a processDebugLoc() 2009-07-16 21:07:26 +00:00
System Add a raw_ostream operator<< to sys::Path. 2009-07-15 16:33:33 +00:00
Target Let callers decide the sub-register index on the def operand of rematerialized instructions. 2009-07-16 09:20:10 +00:00
Transforms Revert yesterday's change by removing the LLVMContext parameter to AllocaInst and MallocInst. 2009-07-15 23:53:25 +00:00
AbstractTypeUser.h
Argument.h
Attributes.h Cosmetic changes to parameter attribute verification. 2009-06-11 08:11:03 +00:00
AutoUpgrade.h
BasicBlock.h "LLVMContext* " --> "LLVMContext *" 2009-07-06 23:00:19 +00:00
CallGraphSCCPass.h Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a number of issues in 2009-07-16 18:04:31 +00:00
CallingConv.h Address review comments: add 3 ARM calling conventions. 2009-06-16 18:50:49 +00:00
CMakeLists.txt
Constant.h These don't really need contexts either. 2009-07-13 22:18:28 +00:00
Constants.h Privatize the ConstantFP table. I'm on a roll! 2009-07-16 19:05:41 +00:00
DerivedTypes.h improve the APIs for creating struct and function types with no arguments/elements 2009-07-01 04:13:31 +00:00
Function.h "LLVMContext* " --> "LLVMContext *" 2009-07-06 23:00:19 +00:00
GlobalAlias.h
GlobalValue.h add missing predicate. 2009-07-09 04:56:23 +00:00
GlobalVariable.h Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required. 2009-07-08 19:03:57 +00:00
InlineAsm.h
InstrTypes.h These don't really need contexts either. 2009-07-13 22:18:28 +00:00
Instruction.def Remove the vicmp and vfcmp instructions. Because we never had a release with 2009-07-08 03:04:38 +00:00
Instruction.h This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!? 2009-07-09 23:48:35 +00:00
Instructions.h Revert yesterday's change by removing the LLVMContext parameter to AllocaInst and MallocInst. 2009-07-15 23:53:25 +00:00
IntrinsicInst.h A little bit more LLVMContextification. 2009-07-09 18:36:20 +00:00
Intrinsics.h LLVMContext-ification. 2009-07-07 23:43:39 +00:00
Intrinsics.td Remove the v3i32 and v3f32 value types: they are not 2009-07-15 15:28:52 +00:00
IntrinsicsAlpha.td
IntrinsicsARM.td Change NEON vldN/vstN intrinsics to specify "N" as an immediate operand 2009-07-07 22:27:20 +00:00
IntrinsicsCellSPU.td
IntrinsicsPowerPC.td
IntrinsicsX86.td
IntrinsicsXCore.td
LinkAllPasses.h Introduce a pointertracking pass. 2009-07-14 18:44:28 +00:00
LinkAllVMCore.h Hold the LLVMContext by reference rather than by pointer. 2009-07-01 21:22:36 +00:00
Linker.h Make the use of const with respect to LLVMContext sane. Hopefully this is the last time, for the 2009-07-01 23:13:44 +00:00
LLVMContext.h Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a number of issues in 2009-07-16 18:04:31 +00:00
MDNode.h llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable. 2009-07-14 16:55:14 +00:00
Module.h Make the use of const with respect to LLVMContext sane. Hopefully this is the last time, for the 2009-07-01 23:13:44 +00:00
ModuleProvider.h
OperandTraits.h Remove some dead functions, patch by Ryan Flynn! 2009-07-14 18:58:35 +00:00
Pass.h "LLVMContext* " --> "LLVMContext *" 2009-07-06 23:00:19 +00:00
PassAnalysisSupport.h Simplify assertion message to avoid confusion. 2009-06-02 17:26:29 +00:00
PassManager.h
PassManagers.h
PassSupport.h
SymbolTableListTraits.h
Type.h Add an LLVMContext to Type, hardwired to the global context until Type uniquing is moved on the contexts themselves. 2009-07-15 22:50:23 +00:00
TypeSymbolTable.h
Use.h
User.h Remove some dead functions, patch by Ryan Flynn! 2009-07-14 18:58:35 +00:00
Value.h
ValueSymbolTable.h