Skip to contentSkip to conversation

Stash debug symbols for build results

PATCH In review Ian Campbell 2 participants 7 messages Oct 31, 2013

lore
Share & tools
lore
#0 lore raw

v2 cover Stash debug symbols for build results

These are handy when debugging stack traces etc.

The resulting xen-syms.gz is ~1M and the resulting vmlinux.gz is ~13M on ARM. I assume x86 will be ballpark similar...

Ian.

#1 lore raw

PATCH v2 1/3 ts-kernel-build: Enable CONFIG_DEBUG_INFO_REDUCED

This makes the resulting vmlinux file with debug symbols much more manageable without compromising the usefulness for converting addresses into line numbers etc.

---
 ts-kernel-build |    1 +
 1 file changed, 1 insertion(+)
ts-kernel-build +1 -0
index 5630dd7..824dc9e 100755
@@ -208,6 +208,7 @@ setopt CONFIG_VIDEO n
 setopt CONFIG_BOOTSPLASH n
 
 setopt CONFIG_DEBUG_INFO y
+setopt CONFIG_DEBUG_INFO_REDUCED y
 
 setopt CONFIG_XEN_KBDDEV_FRONTEND y
 
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH v2 2/3 TestSupport: Add interface to compress stash files

In reply to Ian Campbell

Use it in ts-logs-capture

---
 Osstest/TestSupport.pm |    8 +++++++-
 ts-logs-capture        |    5 +----
 2 files changed, 8 insertions(+), 5 deletions(-)
Osstest/TestSupport.pm +7 -1
index f4ec055..dba5cef 100644
@@ -66,7 +66,7 @@ BEGIN {
                       serial_fetch_logs
                       propname_massage
          
-                      get_stashed open_unique_stashfile
+                      get_stashed open_unique_stashfile compress_stashed
                       dir_identify_vcs build_clone built_stash 
                       hg_dir_revision git_dir_revision vcs_dir_revision
                       store_revision store_vcs_revision
@@ -843,6 +843,12 @@ sub get_stashed ($$) {
     return "$c{Stash}/$oflight/$ojob/$path";
 }
 
+sub compress_stashed($) {
+    my ($path) = @_;
+    my $r= system 'gzip','-9vf','--',"$stash/$path";
+    die "$r $!" if $r;
+}
+
 #---------- other stuff ----------
 
 sub host_reboot ($) {
ts-logs-capture +1 -4
index 2dd95ea..a0bd936 100755
@@ -61,10 +61,7 @@ END
                 target_getfile_root($lho,60, $logfile,"$stash/$llogfile");
 		if ($logfile !~ m/\.gz$/) {
 		    stat("$stash/$llogfile") or die "$stash/$llogfile $!";
-		    if ((stat _)[7] > 100000) {
-			my $r= system 'gzip','-9vf','--',"$stash/$llogfile";
-			die "$r $!" if $r;
-		    }
+		    compress_stashed($llogfile) if(stat _)[7] > 100000;
 		}
                 1;
             }) {
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH v2 3/3 Stash debug symbols for build results

In reply to Ian Campbell

Specifically xen-syms (<1M compressed) and the vmlinux (~13M compressed) files.

---
 Osstest/TestSupport.pm |   18 +++++++++++++++++-
 ts-kernel-build        |    2 ++
 ts-xen-build           |    2 ++
 3 files changed, 21 insertions(+), 1 deletion(-)
Osstest/TestSupport.pm +17 -1
index dba5cef..1ac4cf7 100644
@@ -67,7 +67,8 @@ BEGIN {
                       propname_massage
          
                       get_stashed open_unique_stashfile compress_stashed
-                      dir_identify_vcs build_clone built_stash 
+                      dir_identify_vcs build_clone built_stash built_stash_file
+                      built_compress_stashed
                       hg_dir_revision git_dir_revision vcs_dir_revision
                       store_revision store_vcs_revision
 
@@ -1050,6 +1051,21 @@ END
     store_runvar("path_$item", $stashleaf);
 }
 
+sub built_stash_file ($$$$) {
+    my ($ho, $builddir, $item, $fname) = @_;
+    my $build= "build";
+    my $stashleaf= "$build/$item";
+    ensuredir("$stash/$build");
+    target_getfile($ho, 300,
+                   "$builddir/$fname",
+                   "$stash/$stashleaf");
+}
+
+sub built_compress_stashed($) {
+    my ($path) = @_;
+    compress_stashed("build/$path");
+}
+
 sub vcs_dir_revision ($$$) {
     my ($ho,$builddir,$vcs) = @_;
     no strict qw(refs);
ts-kernel-build +2 -0
index 824dc9e..babd261 100755
@@ -322,3 +322,5 @@ if ($r{tree_linuxfirmware}) {
     fwinstall();
 }
 built_stash($ho, $builddir, 'dist', 'kerndist');
+built_stash_file($ho, $builddir, 'vmlinux', 'linux/vmlinux');
+built_compress_stashed('vmlinux');
ts-xen-build +2 -0
index 8a905f5..5f544df 100755
@@ -198,6 +198,8 @@ sub stash () {
                     "xen-unstable/dist/${part}install",
                     "${part}dist");
     }
+    built_stash_file($ho, $builddir, "xen-syms", "xen-unstable/xen/xen-syms");
+    built_compress_stashed("xen-syms");
 }
 
 sub checkversions () {
Signature · 1 line
1.7.10.4
Acked-by on the v2 series
#4 lore raw
In reply to Ian Campbell

Ian Campbell writes ("[PATCH OSSTEST 0/3 v2] Stash debug symbols for build results"):

Quoted 4 lines

These are handy when debugging stack traces etc.

The resulting xen-syms.gz is ~1M and the resulting vmlinux.gz is ~13M on ARM. I assume x86 will be ballpark similar...

All three:

I think this and the other stuff can safely be rebased on top of current "pretest" (ie staging) and pushed right away. Would you like to do that ?

Ian.

#5 lore raw
Quoted 6 lines · Ian Jackson

Ian Campbell writes ("[PATCH OSSTEST 0/3 v2] Stash debug symbols for build results"):

Quoted 4 lines

These are handy when debugging stack traces etc.

The resulting xen-syms.gz is ~1M and the resulting vmlinux.gz is ~13M on ARM. I assume x86 will be ballpark similar...

Quoted 6 lines

All three:

I think this and the other stuff can safely be rebased on top of current "pretest" (ie staging) and pushed right away. Would you like to do that ?

Sure. I'll look at it some time this evening hopefully.

Ian.

#6 lore raw
In reply to Ian Jackson
Quoted 6 lines · Ian Jackson

Ian Campbell writes ("[PATCH OSSTEST 0/3 v2] Stash debug symbols for build results"):

Quoted 4 lines

These are handy when debugging stack traces etc.

The resulting xen-syms.gz is ~1M and the resulting vmlinux.gz is ~13M on ARM. I assume x86 will be ballpark similar...

Quoted 6 lines

All three:

I think this and the other stuff can safely be rebased on top of current "pretest" (ie staging) and pushed right away. Would you like to do that ?

Done. Pushed these:

$ git log --oneline a949ddb..79b27b7 
79b27b7 PDU/xenuse: Support xenuse on machine not locked by current user
84be2dc Stash debug symbols for build results
9791747 TestSupport: Add interface to compress stash files
f1eace5 ts-kernel-build: Enable CONFIG_DEBUG_INFO_REDUCED
768a930 Debian: Allow per-host additional u-boot script commands
f6a55e3 arm boot fixes and improvements