Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/sparc64 Avoid using excessive kernel stack.



details:   https://anonhg.NetBSD.org/src/rev/87177709f339
branches:  trunk
changeset: 1010647:87177709f339
user:      martin <martin%NetBSD.org@localhost>
date:      Sun May 31 11:28:52 2020 +0000

description:
Avoid using excessive kernel stack.
XXX maybe we should unite all "static proc_t" and "static lwp_t" in ddb
into one global each?

diffstat:

 sys/arch/sparc64/sparc64/db_trace.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r a990c98b2c3b -r 87177709f339 sys/arch/sparc64/sparc64/db_trace.c
--- a/sys/arch/sparc64/sparc64/db_trace.c       Sun May 31 11:12:36 2020 +0000
+++ b/sys/arch/sparc64/sparc64/db_trace.c       Sun May 31 11:28:52 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_trace.c,v 1.54 2020/03/10 15:54:52 christos Exp $ */
+/*     $NetBSD: db_trace.c,v 1.55 2020/05/31 11:28:52 martin Exp $ */
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath.  All rights reserved.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.54 2020/03/10 15:54:52 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.55 2020/05/31 11:28:52 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -102,9 +102,10 @@
 #endif
        } else {
                if (trace_thread) {
-                       proc_t p;
-                       lwp_t l;
+                       static proc_t p;
+                       static lwp_t l;
                        struct pcb *pcb;
+
                        if (lwpaddr) {
                                db_read_bytes(addr, sizeof(l), (char *)&l);
                                db_read_bytes((db_addr_t)l.l_proc,



Home | Main Index | Thread Index | Old Index