kern_ktr.c (103995) | kern_ktr.c (111270) |
---|---|
1/* 2 * Copyright (c) 2000 3 * John Baldwin <jhb@FreeBSD.org>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGE. 28 * | 1/* 2 * Copyright (c) 2000 3 * John Baldwin <jhb@FreeBSD.org>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sys/kern/kern_ktr.c 103995 2002-09-26 07:38:56Z jeff $ | 29 * $FreeBSD: head/sys/kern/kern_ktr.c 111270 2003-02-22 23:30:37Z jake $ |
30 */ 31 32/* 33 * This module holds the global variables used by KTR and the ktr_tracepoint() 34 * function that does the actual tracing. 35 */ 36 37#include "opt_ddb.h" --- 220 unchanged lines hidden (view full) --- 258static int db_ktr_verbose; 259static int db_mach_vtrace(void); 260 261#define NUM_LINES_PER_PAGE 18 262 263DB_SHOW_COMMAND(ktr, db_ktr_all) 264{ 265 int c, lines; | 30 */ 31 32/* 33 * This module holds the global variables used by KTR and the ktr_tracepoint() 34 * function that does the actual tracing. 35 */ 36 37#include "opt_ddb.h" --- 220 unchanged lines hidden (view full) --- 258static int db_ktr_verbose; 259static int db_mach_vtrace(void); 260 261#define NUM_LINES_PER_PAGE 18 262 263DB_SHOW_COMMAND(ktr, db_ktr_all) 264{ 265 int c, lines; |
266 int all = 0; |
|
266 267 lines = NUM_LINES_PER_PAGE; 268 tstate.cur = (ktr_idx - 1) & (KTR_ENTRIES - 1); 269 tstate.first = -1; 270 if (strcmp(modif, "v") == 0) 271 db_ktr_verbose = 1; 272 else 273 db_ktr_verbose = 0; | 267 268 lines = NUM_LINES_PER_PAGE; 269 tstate.cur = (ktr_idx - 1) & (KTR_ENTRIES - 1); 270 tstate.first = -1; 271 if (strcmp(modif, "v") == 0) 272 db_ktr_verbose = 1; 273 else 274 db_ktr_verbose = 0; |
275 if (strcmp(modif, "a") == 0) 276 all = 1; |
|
274 while (db_mach_vtrace()) | 277 while (db_mach_vtrace()) |
275 if (--lines == 0) { | 278 if (all) { 279 if (cncheckc() != -1) 280 return; 281 } else if (--lines == 0) { |
276 db_printf("--More--"); 277 c = cngetc(); 278 db_printf("\r"); 279 switch (c) { 280 case '\n': /* one more line */ 281 lines = 1; 282 break; 283 case ' ': /* one more page */ --- 48 unchanged lines hidden --- | 282 db_printf("--More--"); 283 c = cngetc(); 284 db_printf("\r"); 285 switch (c) { 286 case '\n': /* one more line */ 287 lines = 1; 288 break; 289 case ' ': /* one more page */ --- 48 unchanged lines hidden --- |