From nobody Mon Dec 20 00:41:30 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2A27F18F2215; Mon, 20 Dec 2021 00:41:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JHLPQ6MlPz3tlh; Mon, 20 Dec 2021 00:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AFD424E78; Mon, 20 Dec 2021 00:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BK0fUl0069604; Mon, 20 Dec 2021 00:41:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BK0fUqq069603; Mon, 20 Dec 2021 00:41:30 GMT (envelope-from git) Date: Mon, 20 Dec 2021 00:41:30 GMT Message-Id: <202112200041.1BK0fUqq069603@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 18048b6e3cb6 - main - Eliminate key press requirement "show vmopag" command output. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 18048b6e3cb647f2a18e1e51df1cf86a90fc6802 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639960890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nQn//1/wp5qtjBc6T0GtRWILQ2wQgcN30zHK8A5AhWo=; b=gNJCi72Ib1LTkhAhzTwUQl/nJEyHzjHG4YhjIIIt3TMwcTudijUtJQ+/N6cLUZ0WGeBBAY hOMKl5U76ymDVQDcgmTjFBh+PrxALLMgskEnvLJHApySVGjFMuW0hcdjrLHRyy4nHQIf3O /pMDu8hFnzWFcn8QIUSrvpxKxBjIU3FzBlUoSMmXust/ieNNrwafltBHeztIrGM2Qu3P/+ XcV0bodVuRaZveNj7k6TpPRu/aUzpb763LEuPtUM8PnZK36GxmI8krGuw3xkdTGmmqF9Lw GAbwDHeBoWgPebEojU1f3n1HZLhGQqjWibdaiqkokD0ciWgQveYzUsBvmFyFDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639960890; a=rsa-sha256; cv=none; b=fpjNI2lB6JGdVm0q9DQ8op3xElgyy/Uh+Ywu4CTalk5BsloeE5es3XD35IwZvZHL82kxqX f6elsHRh7L1EWydrzXLsWaCkNQQoGKnZcFd4Sg0tTOYCa0YIT7Nn8UHMCweg3EljEquW/T rg4ZbuI2SfixN69TaYuyzESWuFUzOIqpjU/jFV5CG3KuYRiGIPAHDSGPZ8hrkCXAXOdC3d Ko7qQbMzEMdqTWqAz2HuevH69PTaj+EuypJNkCSVdlt3Ivr2femmi2se5gIxx1zn9k0ZiZ PN/V+SYl0asNCR1zQHjrhgmeAMtvhOV/CdW1aSoVBBcVxbfeCsKK2lFJcnnUgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=18048b6e3cb647f2a18e1e51df1cf86a90fc6802 commit 18048b6e3cb647f2a18e1e51df1cf86a90fc6802 Author: Stephen J. Kiernan AuthorDate: 2021-12-17 21:39:51 +0000 Commit: Stephen J. Kiernan 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; } } }