git: 18048b6e3cb6 - main - Eliminate key press requirement "show vmopag" command output.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 20 Dec 2021 00:41:30 UTC
The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=18048b6e3cb647f2a18e1e51df1cf86a90fc6802 commit 18048b6e3cb647f2a18e1e51df1cf86a90fc6802 Author: Stephen J. Kiernan <stevek@FreeBSD.org> AuthorDate: 2021-12-17 21:39:51 +0000 Commit: Stephen J. Kiernan <stevek@FreeBSD.org> CommitDate: 2021-12-20 00:40:52 +0000 Eliminate key press requirement "show vmopag" command output. Summary: One was required to press a key to continue after every 18 lines of output. This requirement had been in the "show vmopag" command since it was introduced, which was many years before paging was added to DDB. With paging, this explict key check is no longer necessary. Obtained from: Juniper Networks, Inc. MFC after: 1 week Test Plan: Run "show vmopag" from db> prompt and see that it does not need additional keypresses other than the ones needed for the pager. Subscribers: imp, #contributor_reviews_base Differential Revision: https://reviews.freebsd.org/D33550 --- sys/vm/vm_object.c | 40 ++++++++++------------------------------ 1 file changed, 10 insertions(+), 30 deletions(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 9bcf810df744..7bc503f7afdf 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2830,18 +2830,13 @@ DB_SHOW_COMMAND(vmopag, vm_object_print_pages) vm_pindex_t fidx; vm_paddr_t pa; vm_page_t m, prev_m; - int rcount, nl, c; + int rcount; - nl = 0; TAILQ_FOREACH(object, &vm_object_list, object_list) { db_printf("new object: %p\n", (void *)object); - if (nl > 18) { - c = cngetc(); - if (c != ' ') - return; - nl = 0; - } - nl++; + if (db_pager_quit) + return; + rcount = 0; fidx = 0; pa = -1; @@ -2853,13 +2848,8 @@ DB_SHOW_COMMAND(vmopag, vm_object_print_pages) if (rcount) { db_printf(" index(%ld)run(%d)pa(0x%lx)\n", (long)fidx, rcount, (long)pa); - if (nl > 18) { - c = cngetc(); - if (c != ' ') - return; - nl = 0; - } - nl++; + if (db_pager_quit) + return; rcount = 0; } } @@ -2871,13 +2861,8 @@ DB_SHOW_COMMAND(vmopag, vm_object_print_pages) if (rcount) { db_printf(" index(%ld)run(%d)pa(0x%lx)\n", (long)fidx, rcount, (long)pa); - if (nl > 18) { - c = cngetc(); - if (c != ' ') - return; - nl = 0; - } - nl++; + if (db_pager_quit) + return; } fidx = m->pindex; pa = VM_PAGE_TO_PHYS(m); @@ -2886,13 +2871,8 @@ DB_SHOW_COMMAND(vmopag, vm_object_print_pages) if (rcount) { db_printf(" index(%ld)run(%d)pa(0x%lx)\n", (long)fidx, rcount, (long)pa); - if (nl > 18) { - c = cngetc(); - if (c != ' ') - return; - nl = 0; - } - nl++; + if (db_pager_quit) + return; } } }