Project

General

Profile

Actions

Bug #12269

closed

mdb multilist walker should be a layered walker

Added by Jason King over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
mdb - modular debugger
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

A multilist_t is broadly a linked list that's broken up into smaller list_t@s for parallelism. To walk the contents of a @multilist_t, the current multilist walker issues a mdb_pwalk in each step of its step function, and prints the address of the object. However this limits use by other dcmds (such as ::abuf_find). Implementing it as a layered walker would be a better fit (and allow for the desired composition).


Related issues

Related to illumos gate - Bug #12267: zfs '::abuf_find' dcmd is brokenClosed

Actions
Actions #1

Updated by Jason King over 1 year ago

  • Related to Bug #12267: zfs '::abuf_find' dcmd is broken added
Actions #2

Updated by Jason King over 1 year ago

To test, I first obtained the address of a multilist_t with mdb:

> ARC_mru::print arc_state_t
{
    arcs_list = [ 0, 0xfffffe16d9ecd7e8, 0xfffffe16d9ecd808 ]
...
}

Using 0xfffffe16d9ecd7e8 as my multilist_t, I compared the output of the existing walker to the new new one to verify there was no differences:

root@pi:/ws/illumos-gate/usr/src/cmd/mdb/common/modules/zfs (abuf_find)# echo '0xfffffe16d9ecd7e8::walk multlist' | mdb -k > /tmp/1
root@pi:/ws/illumos-gate/usr/src/cmd/mdb/common/modules/zfs (abuf_find)# mdb -e '0xfffffe16d9ecd7e8::walk multilist' -k -L /ws/illumos-gate/proto/root_i386/usr/lib/mdb/kvm/amd64 > /tmp/2
root@pi:/ws/illumos-gate/usr/src/cmd/mdb/common/modules/zfs (abuf_find)# diff -u /tmp/1 /tmp/2
No differences encountered
Actions #3

Updated by Electric Monk over 1 year ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 442c994cdeb1e51c84e6d7ba987af00893aa84c4

commit  442c994cdeb1e51c84e6d7ba987af00893aa84c4
Author: Jason King <jason.king@joyent.com>
Date:   2020-02-03T14:43:45.000Z

    12269 mdb multilist walker should be a layered walker
    Reviewed by: Kody Kantor <kody@kkantor.com>
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF