Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/gdbscripts make '$e' in here the whole structure instead...



details:   https://anonhg.NetBSD.org/src/rev/834b9407c78b
branches:  trunk
changeset: 345186:834b9407c78b
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu May 12 00:35:10 2016 +0000

description:
make '$e' in here the whole structure instead of a pointer, to combine
several pointer derefs into one speaking this up significantly.

diffstat:

 sys/gdbscripts/kernhist |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (28 lines):

diff -r 3da14a28d742 -r 834b9407c78b sys/gdbscripts/kernhist
--- a/sys/gdbscripts/kernhist   Wed May 11 21:28:21 2016 +0000
+++ b/sys/gdbscripts/kernhist   Thu May 12 00:35:10 2016 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: kernhist,v 1.1 2016/05/11 09:22:55 mrg Exp $
+#      $NetBSD: kernhist,v 1.2 2016/05/12 00:35:10 mrg Exp $
 
 # by mrg and skrll
 
@@ -12,13 +12,13 @@
 
        printf "Kernel history %s has %d entries (next free %d)\n", $hist->name, $histn, $histf
        while (1)
-               set $e = &$hist->e[$lcv]
-               set $fmt = $e->fmt
+               set $e = $hist->e[$lcv]
+               set $fmt = $e.fmt
 
                if ($fmt)
-                       printf "%06lx.%06d ", $e->tv.tv_sec, $e->tv.tv_usec
-                       printf "%s#%ld@%d: ", $e->fn, $e->call, $e->cpunum
-                       printf "%s: %lx %lx %lx %lx\n", $fmt, $e->v[0], $e->v[1], $e->v[2], $e->v[3]
+                       printf "%06lx.%06d ", $e.tv.tv_sec, $e.tv.tv_usec
+                       printf "%s#%ld@%d: ", $e.fn, $e.call, $e.cpunum
+                       printf "%s: %lx %lx %lx %lx\n", $fmt, $e.v[0], $e.v[1], $e.v[2], $e.v[3]
                        set $lcv = ($lcv + 1) % $histn
                else
                        if ($histf == 0)



Home | Main Index | Thread Index | Old Index