[llvm-commits] CVS: llvm/utils/profile.pl
    Chris Lattner 
    lattner at cs.uiuc.edu
       
    Tue Oct 28 16:53:01 PST 2003
    
    
  
Changes in directory llvm/utils:
profile.pl updated: 1.1 -> 1.2
---
Log message:
Add option for block profiling, pass in the "correct" argv[0] to the program
---
Diffs of the changes:  (+4 -6)
Index: llvm/utils/profile.pl
diff -u llvm/utils/profile.pl:1.1 llvm/utils/profile.pl:1.2
--- llvm/utils/profile.pl:1.1	Tue Oct 28 16:11:31 2003
+++ llvm/utils/profile.pl	Tue Oct 28 16:52:05 2003
@@ -8,10 +8,8 @@
 # Syntax:   profile.pl [OPTIONS] bytecodefile <arguments>
 #
 # OPTIONS may include one or more of the following:
-#     NONE SO FAR
+#     -block - Enable basic block level profiling
 #
-#
-
 
 my $ProfilePass = "-insert-function-profiling";
 
@@ -21,7 +19,7 @@
   last if /^--$/;  # Stop processing arguments on --
 
   # List command line options here...
-  #if (/^-enable-foo$/)     { $FOO = 1; next; }
+  if (/^-block$/) { $ProfilePass = "-insert-block-profiling"; next; }
 
   print "Unknown option: $_ : ignoring!\n";
 }
@@ -38,7 +36,7 @@
 
 my $LibProfPath = $LLIPath . "/../../lib/Debug/libprofile_rt.so";
 
-system "opt $ProfilePass < $BytecodeFile | lli -load $LibProfPath - " .
-         (join ' ', @ARGV);
+system "opt $ProfilePass < $BytecodeFile | lli -fake-argv0 '$BytecodeFile'" .
+       " -load $LibProfPath - " . (join ' ', @ARGV);
 
 system "llvm-prof $BytecodeFile";
    
    
More information about the llvm-commits
mailing list