VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   57 Tags
author: Arjan van de Ven <arjan@infradead.org> 2006-03-25 16:30:49 +0100 committer: Linus Torvalds <torvalds@g5.osdl.org> 2006-03-25 09:10:56 -0800 commit: 4bdc3b7f1b730c07f5a6ccca77ee68e044036ffc parent: 9b2a13b963dece8d45e07692b7872ae5a075ca2a
Commit Summary:
[PATCH] x86_64: Basic reorder infrastructure
Diffstat:
1 file changed, 16 insertions, 0 deletions
diff --git a/scripts/profile2linkerlist.pl b/scripts/profile2linkerlist.pl
new file mode 100644
index 000000000000..cb4260ebdb91
--- /dev/null
+++ b/scripts/profile2linkerlist.pl
@@ -0,0 +1,21 @@
+#!/usr/bin/perl
+
+#
+# Takes a (sorted) output of readprofile and turns it into a list suitable for
+# linker scripts
+#
+# usage:
+#	 readprofile | sort -rn | perl profile2linkerlist.pl > functionlist
+#
+
+while (<>) {
+  my $line = $_;
+
+  $_ =~ /\W*[0-9]+\W*([a-zA-Z\_0-9]+)\W*[0-9]+/;
+
+  if ( ($line =~ /unknown/) || ($line =~ /total/)) {
+
+  } else {
+    print "*(.text.$1)\n";
+  }
+}