El lun, 10-09-2007 a las 11:55 -0700, Chris Lattner
escribió:> The profiling support in LLVM hasn't been used for quite a while, so it
> may have bitrotted slightly. However, the support should basically work,
> so it shouldn't take much to bring it back to life.
Thank you, it seems working again with this simple patch:
Index: runtime/Makefile
==================================================================---
runtime/Makefile (revision 41794)
+++ runtime/Makefile (working copy)
@@ -11,11 +11,7 @@
include $(LEVEL)/Makefile.config
ifeq ($(LLVMGCC_MAJVERS),4)
-PARALLEL_DIRS :-install all::
- $(Echo) "Warning: These runtime libraries only need to be built
with"
- $(Echo) "Warning: llvm-gcc version 3. They are automatically
included"
- $(Echo) "Warning: with llvm-gcc version 4 and beyond"
+PARALLEL_DIRS := libprofile
else
ifneq ($(wildcard $(LLVMGCC)),)
PARALLEL_DIRS := libdummy libprofile GC
Index: utils/profile.pl
==================================================================---
utils/profile.pl (revision 41794)
+++ utils/profile.pl (working copy)
@@ -62,11 +62,10 @@
shift @ARGV;
-my $LLIPath = `which lli`;
-$LLIPath = `dirname $LLIPath`;
-chomp $LLIPath;
+my $libdir = `llvm-config --libdir`;
+chomp $libdir;
-my $LibProfPath = $LLIPath . "/../../Debug/lib/profile_rt.so";
+my $LibProfPath = $libdir . "/profile_rt.so";
system "opt -q -f $ProfilePass $BytecodeFile -o $BytecodeFile.inst";
system "lli -fake-argv0 '$BytecodeFile' -load $LibProfPath "
.