diff --git a/.github/scripts/install-drgn.sh b/.github/scripts/install-drgn.sh index 3b2c8e6d..7a30eba9 100755 --- a/.github/scripts/install-drgn.sh +++ b/.github/scripts/install-drgn.sh @@ -4,7 +4,8 @@ # These are build requirements of "drgn"; if we don't install these, the # build/install of "drgn" will fail below. # -sudo apt-get install bison flex libelf-dev libdw-dev libomp5 libomp-dev +sudo apt update +sudo apt install bison flex libelf-dev libdw-dev libomp5 libomp-dev git clone https://github.com/osandov/drgn.git diff --git a/.github/scripts/install-libkdumpfile.sh b/.github/scripts/install-libkdumpfile.sh index 80e27449..de7471f6 100755 --- a/.github/scripts/install-libkdumpfile.sh +++ b/.github/scripts/install-libkdumpfile.sh @@ -6,8 +6,9 @@ # all version of python3.X-dev so the Github actions jobs can install # libkdumpfile with the right version. # -sudo apt-get install autoconf automake liblzo2-dev libsnappy1v5 libtool pkg-config zlib1g-dev -sudo apt-get install python3.6-dev python3.7-dev python3.8-dev +sudo apt update +sudo apt install autoconf automake liblzo2-dev libsnappy1v5 libtool pkg-config zlib1g-dev +sudo apt install python3.6-dev python3.7-dev python3.8-dev git clone https://github.com/ptesarik/libkdumpfile.git diff --git a/README.md b/README.md index 393797ef..4b91638a 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,12 @@ The Slick/Simple Debugger Ensure you have the following dependencies: * Python 3.6 or newer +* [libkdumpfile](https://github.com/ptesarik/libkdumpfile) (optional - needed for kdump-compressed crash dumps) * [drgn](https://github.com/osandov/drgn/) -Then run: +Note that in order for `drgn` to support kdump files it needs to be *compiled* with `libkdumpfile`. Unfortunately that means that users should always install `libkdumpfile` first before installing `drgn`. + +Finally run the following to install `sdb`: ``` $ git clone https://github.com/delphix/sdb.git $ cd sdb @@ -17,3 +20,7 @@ $ sudo python3 setup.py install ``` The above should install `sdb` under `/usr/local/bin/`. + +### Resources + +User and developer resources for sdb can be found in the [project's wiki](https://github.com/delphix/sdb/wiki). diff --git a/sdb/__init__.py b/sdb/__init__.py index 16a30d81..1d24265b 100644 --- a/sdb/__init__.py +++ b/sdb/__init__.py @@ -32,9 +32,9 @@ CommandInvalidInputError, SymbolNotFoundError, CommandArgumentsError, CommandEvalSyntaxError, ParserError) -from sdb.target import (create_object, get_object, get_prog, get_typed_null, - get_type, get_pointer_type, get_target_flags, - get_symbol, type_canonical_name, type_canonicalize, +from sdb.target import (create_object, get_object, get_prog, get_type, + get_pointer_type, get_target_flags, get_symbol, is_null, + type_canonical_name, type_canonicalize, type_canonicalize_name, type_canonicalize_size, type_equals) from sdb.command import (Address, Cast, Command, InputHandler, Locator, @@ -63,6 +63,7 @@ 'create_object', 'execute_pipeline', 'invoke', + 'is_null', 'get_first_type', 'get_object', 'get_pointer_type', @@ -71,7 +72,6 @@ 'get_symbol', 'get_target_flags', 'get_type', - 'get_typed_null', 'type_canonical_name', 'type_canonicalize', 'type_canonicalize_name', diff --git a/sdb/commands/spl/avl.py b/sdb/commands/spl/avl.py index 8eec654f..61333fb2 100644 --- a/sdb/commands/spl/avl.py +++ b/sdb/commands/spl/avl.py @@ -29,7 +29,7 @@ class Avl(sdb.Walker): input_type = "avl_tree_t *" def _helper(self, node: drgn.Object, offset: int) -> Iterable[drgn.Object]: - if node == sdb.get_typed_null(node.type_): + if sdb.is_null(node): return lchild = node.avl_child[0] diff --git a/sdb/commands/zfs/dbuf.py b/sdb/commands/zfs/dbuf.py index cfb3755a..898c3f62 100644 --- a/sdb/commands/zfs/dbuf.py +++ b/sdb/commands/zfs/dbuf.py @@ -81,10 +81,10 @@ def ObjsetName(os: drgn.Object) -> str: os.os_spa.spa_name.string_().decode("utf-8")) return Dbuf.DatasetName(os.os_dsl_dataset) - def pretty_print(self, dbufs: drgn.Object) -> None: + def pretty_print(self, objs: drgn.Object) -> None: print("{:>20} {:>8} {:>4} {:>8} {:>5} {}".format( "addr", "object", "lvl", "blkid", "holds", "os")) - for dbuf in filter(self.argfilter, dbufs): + for dbuf in filter(self.argfilter, objs): print("{:>20} {:>8d} {:>4d} {:>8d} {:>5d} {}".format( hex(dbuf), int(dbuf.db.db_object), int(dbuf.db_level), int(dbuf.db_blkid), int(dbuf.db_holds.rc_count), diff --git a/sdb/commands/zfs/histograms.py b/sdb/commands/zfs/histograms.py index b1af719f..6f9eb48e 100644 --- a/sdb/commands/zfs/histograms.py +++ b/sdb/commands/zfs/histograms.py @@ -90,7 +90,7 @@ def histogram_median(hist: drgn.Object, offset: int = 0) -> int: for (bucket, value) in enumerate(hist): space_in_bucket = int(value) << (bucket + offset) if space_left <= space_in_bucket: - median = 1 << (bucket + offset) + median = 1 << (bucket + offset - 1) # # Size of segments may vary within one bucket thus we # attempt to approximate the median by looking at the @@ -136,19 +136,20 @@ def print_histogram(hist: drgn.Object, if max_count < HISTOGRAM_WIDTH_MAX: max_count = HISTOGRAM_WIDTH_MAX - if min_bucket <= max_bucket: - print(f'{" " * indent}seg-size count') - print(f'{" " * indent}{"-" * 8} {"-" * 5}') + if min_bucket > max_bucket: + print(f'{" " * indent}** No histogram data available **') + return + + print(f'{" " * indent}seg-size count') + print(f'{" " * indent}{"-" * 8} {"-" * 5}') for bucket in range(min_bucket, max_bucket + 1): count = int(hist[bucket]) stars = round(count * HISTOGRAM_WIDTH_MAX / max_count) print(f'{" " * indent}{fmt.size_nicenum(2**(bucket+offset)):>8}: ' f'{count:>6} {"*" * stars}') - if min_bucket > max_bucket: - print(f'{" " * indent}** No histogram data available **') - else: - ZFSHistogram.print_histogram_median(hist, offset, indent) + + ZFSHistogram.print_histogram_median(hist, offset, indent) def _call(self, objs: Iterable[drgn.Object]) -> None: for obj in objs: diff --git a/sdb/commands/zfs/metaslab.py b/sdb/commands/zfs/metaslab.py index 4be07124..7c7b0465 100644 --- a/sdb/commands/zfs/metaslab.py +++ b/sdb/commands/zfs/metaslab.py @@ -133,7 +133,7 @@ def print_metaslab(msp: drgn.Object, print_header: bool, print("".ljust(indent), "-" * 65) free = msp.ms_size - if spacemap != sdb.get_typed_null(spacemap.type_): + if not sdb.is_null(spacemap): free -= spacemap.sm_phys.smp_alloc ufrees = msp.ms_unflushed_frees.rt_space @@ -160,16 +160,16 @@ def print_metaslab(msp: drgn.Object, print_header: bool, print((str(int(msp.ms_fragmentation)) + "%").rjust(6), end="") print(nicenum(uchanges_mem).rjust(9)) - def pretty_print(self, - metaslabs: Iterable[drgn.Object], - indent: int = 0) -> None: + def print_indented(self, + metaslabs: Iterable[drgn.Object], + indent: int = 0) -> None: first_time = True for msp in metaslabs: if not self.args.weight: Metaslab.print_metaslab(msp, first_time, indent) if self.args.histogram: spacemap = msp.ms_sm - if spacemap != sdb.get_typed_null(spacemap.type_): + if not sdb.is_null(spacemap): histogram = spacemap.sm_phys.smp_histogram ZFSHistogram.print_histogram(histogram, int(spacemap.sm_shift), @@ -178,6 +178,9 @@ def pretty_print(self, Metaslab.metaslab_weight_print(msp, first_time, indent) first_time = False + def pretty_print(self, objs: Iterable[drgn.Object]) -> None: + self.print_indented(objs, 0) + @sdb.InputHandler("vdev_t*") def from_vdev(self, vdev: drgn.Object) -> Iterable[drgn.Object]: if self.args.metaslab_ids: diff --git a/sdb/commands/zfs/spa.py b/sdb/commands/zfs/spa.py index ad379487..160e504d 100644 --- a/sdb/commands/zfs/spa.py +++ b/sdb/commands/zfs/spa.py @@ -65,10 +65,10 @@ def __init__(self, if self.args.weight: self.arg_list.append("-w") - def pretty_print(self, spas: Iterable[drgn.Object]) -> None: + def pretty_print(self, objs: Iterable[drgn.Object]) -> None: print("{:18} {}".format("ADDR", "NAME")) print("%s" % ("-" * 60)) - for spa in spas: + for spa in objs: print("{:18} {}".format(hex(spa), spa.spa_name.string_().decode("utf-8"))) if self.args.histogram: @@ -77,7 +77,7 @@ def pretty_print(self, spas: Iterable[drgn.Object]) -> None: if self.args.vdevs or self.args.metaslab: vdevs = sdb.execute_pipeline([spa], [Vdev()]) - Vdev(self.arg_list).pretty_print(vdevs, 5) + Vdev(self.arg_list).print_indented(vdevs, 5) def no_input(self) -> drgn.Object: spas = sdb.execute_pipeline( diff --git a/sdb/commands/zfs/vdev.py b/sdb/commands/zfs/vdev.py index a7be8733..131ae8da 100644 --- a/sdb/commands/zfs/vdev.py +++ b/sdb/commands/zfs/vdev.py @@ -17,7 +17,7 @@ # pylint: disable=missing-docstring import argparse -from typing import Iterable, List, Tuple, Optional +from typing import Iterable, List, Optional import drgn import sdb @@ -69,34 +69,9 @@ def __init__(self, if self.args.weight: self.arg_list.append("-w") - # - # Iterate over the metaslabs to accumulate histogram data. - # - @staticmethod - def sum_histograms( - metaslabs: Iterable[drgn.Object]) -> Tuple[drgn.Object, int]: - shift = -1 - length = 1 - first_time = True - histsum: List[int] = [] - for msp in metaslabs: - if msp.ms_sm == sdb.get_typed_null(msp.ms_sm.type_): - continue - histogram = msp.ms_sm.sm_phys.smp_histogram - if first_time: - shift = int(msp.ms_sm.sm_shift) - length = len(histogram) - histsum = [0] * length - assert length == len(histogram) - assert shift == int(msp.ms_sm.sm_shift) - for (bucket, value) in enumerate(histogram): - histsum[bucket] += int(value) - first_time = False - return sdb.create_object(f'uint64_t[{length}]', histsum), shift - - def pretty_print(self, - vdevs: Iterable[drgn.Object], - indent: int = 0) -> None: + def print_indented(self, + vdevs: Iterable[drgn.Object], + indent: int = 0) -> None: print( "".ljust(indent), "ADDR".ljust(18), @@ -133,14 +108,16 @@ def pretty_print(self, vdev.vdev_ops.vdev_op_type.string_().decode("utf-8"), ) if self.args.histogram: - metaslabs = sdb.execute_pipeline([vdev], [Metaslab()]) - histsum, shift = self.sum_histograms(metaslabs) - if shift > 0: - ZFSHistogram.print_histogram(histsum, shift, indent + 5) + if not sdb.is_null(vdev.vdev_mg): + ZFSHistogram.print_histogram(vdev.vdev_mg.mg_histogram, 0, + indent + 5) if self.args.metaslab: metaslabs = sdb.execute_pipeline([vdev], [Metaslab()]) - Metaslab(self.arg_list).pretty_print(metaslabs, indent + 5) + Metaslab(self.arg_list).print_indented(metaslabs, indent + 5) + + def pretty_print(self, objs: Iterable[drgn.Object]) -> None: + self.print_indented(objs, 0) @sdb.InputHandler("spa_t*") def from_spa(self, spa: drgn.Object) -> Iterable[drgn.Object]: diff --git a/sdb/target.py b/sdb/target.py index 64db9b39..ed9c11d4 100644 --- a/sdb/target.py +++ b/sdb/target.py @@ -60,9 +60,9 @@ def get_pointer_type(type_name: str) -> drgn.Type: return prog.pointer_type(type_name) -def get_typed_null(type_name: str) -> drgn.Object: +def is_null(obj: drgn.Object) -> bool: global prog - return drgn.NULL(prog, type_name) + return bool(obj == drgn.NULL(prog, obj.type_)) def create_object(type_: Union[str, drgn.Type], val: Any) -> drgn.Object: diff --git a/tests/integration/data/regression_output/zfs/spa -H b/tests/integration/data/regression_output/zfs/spa -H index cfb05875..bc85223f 100644 --- a/tests/integration/data/regression_output/zfs/spa -H +++ b/tests/integration/data/regression_output/zfs/spa -H @@ -23,7 +23,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 15 *************** - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa089413b8000 meta-domain seg-size count -------- ----- @@ -45,6 +45,6 @@ ADDR NAME 32.0MB: 0 64.0MB: 1 * 128.0MB: 4 **** - Approx. Median: 184.0MB + Approx. Median: 92.0MB 0xffffa08955c44000 rpool ** No histogram data available ** diff --git a/tests/integration/data/regression_output/zfs/spa -mH b/tests/integration/data/regression_output/zfs/spa -mH index 2fa8e0c1..b32dd225 100644 --- a/tests/integration/data/regression_output/zfs/spa -mH +++ b/tests/integration/data/regression_output/zfs/spa -mH @@ -23,7 +23,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 15 *************** - Approx. Median: 384.0MB + Approx. Median: 192.0MB ADDR STATE AUX DESCRIPTION ------------------------------------------------------------ 0xffffa089486fc000 HEALTHY NONE root @@ -50,7 +50,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 15 *************** - Approx. Median: 384.0MB + Approx. Median: 192.0MB ADDR ID OFFSET FREE FRAG UCMU ----------------------------------------------------------------- 0xffffa0894e6e1000 0 0x0 511MB 0% 8KB @@ -76,7 +76,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e6e4000 1 0x20000000 511MB 0% 8KB seg-size count -------- ----- @@ -100,7 +100,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e6e2800 2 0x40000000 511MB 0% 8KB seg-size count -------- ----- @@ -124,7 +124,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e6e3800 3 0x60000000 511MB 0% 8KB seg-size count -------- ----- @@ -148,7 +148,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e6e3000 4 0x80000000 511MB 0% 8KB seg-size count -------- ----- @@ -172,7 +172,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e6e4800 5 0xa0000000 511MB 0% 8KB seg-size count -------- ----- @@ -196,7 +196,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e6e7800 6 0xc0000000 511MB 0% 4KB seg-size count -------- ----- @@ -220,7 +220,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e6e2000 7 0xe0000000 511MB 0% 8KB seg-size count -------- ----- @@ -244,7 +244,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e637800 8 0x100000000 511MB 0% 8KB seg-size count -------- ----- @@ -268,7 +268,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e634800 9 0x120000000 511MB 0% 4KB seg-size count -------- ----- @@ -291,7 +291,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e633000 10 0x140000000 511MB 0% 4KB seg-size count -------- ----- @@ -314,7 +314,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e633800 11 0x160000000 509MB 0% 4KB seg-size count -------- ----- @@ -338,7 +338,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e632800 12 0x180000000 511MB 0% 4KB seg-size count -------- ----- @@ -362,7 +362,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e634000 13 0x1a0000000 511MB 0% 4KB seg-size count -------- ----- @@ -386,7 +386,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e631000 14 0x1c0000000 511MB 0% 4KB seg-size count -------- ----- @@ -410,10 +410,11 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa08948af8000 HEALTHY NONE /dev/sdb1 0xffffa08949ff8000 HEALTHY NONE /dev/sdc1 0xffffa08949e58000 HEALTHY NONE /dev/sdd1 + ** No histogram data available ** ADDR ID OFFSET FREE FRAG UCMU ----------------------------------------------------------------- 0xffffa0894e631800 0 0x0 512MB 0% 0B @@ -452,7 +453,7 @@ ADDR NAME 32.0MB: 0 64.0MB: 1 * 128.0MB: 4 **** - Approx. Median: 184.0MB + Approx. Median: 92.0MB ADDR STATE AUX DESCRIPTION ------------------------------------------------------------ 0xffffa08953aa4000 HEALTHY NONE root @@ -477,7 +478,7 @@ ADDR NAME 32.0MB: 0 64.0MB: 1 * 128.0MB: 4 **** - Approx. Median: 184.0MB + Approx. Median: 92.0MB ADDR ID OFFSET FREE FRAG UCMU ----------------------------------------------------------------- 0xffffa0894c701000 0 0x0 256MB 0% 0B @@ -501,7 +502,7 @@ ADDR NAME 16.0MB: 0 32.0MB: 0 64.0MB: 1 * - Approx. Median: 95.9MB + Approx. Median: 48.0MB 0xffffa0894c700800 2 0x20000000 255MB 0% 8KB seg-size count -------- ----- @@ -523,7 +524,7 @@ ADDR NAME 32.0MB: 0 64.0MB: 0 128.0MB: 1 * - Approx. Median: 191.9MB + Approx. Median: 96.0MB 0xffffa0894c706000 3 0x30000000 255MB 0% 8KB seg-size count -------- ----- @@ -545,7 +546,7 @@ ADDR NAME 32.0MB: 0 64.0MB: 0 128.0MB: 1 * - Approx. Median: 192.0MB + Approx. Median: 96.0MB 0xffffa0894c707000 4 0x40000000 223MB 0% 4KB seg-size count -------- ----- @@ -567,12 +568,12 @@ ADDR NAME 32.0MB: 0 64.0MB: 0 128.0MB: 1 * - Approx. Median: 192.0MB + Approx. Median: 96.0MB 0xffffa0894c706800 5 0x50000000 255MB 0% 4KB seg-size count -------- ----- 128.0MB: 1 * - Approx. Median: 192.0MB + Approx. Median: 96.0MB 0xffffa0894c703000 6 0x60000000 256MB 0% 0B 0xffffa0894c703800 7 0x70000000 256MB 0% 0B 0xffffa0894c705000 8 0x80000000 256MB 0% 0B diff --git a/tests/integration/data/regression_output/zfs/spa -vH b/tests/integration/data/regression_output/zfs/spa -vH index 31216382..d12388a4 100644 --- a/tests/integration/data/regression_output/zfs/spa -vH +++ b/tests/integration/data/regression_output/zfs/spa -vH @@ -23,7 +23,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 15 *************** - Approx. Median: 384.0MB + Approx. Median: 192.0MB ADDR STATE AUX DESCRIPTION ------------------------------------------------------------ 0xffffa089486fc000 HEALTHY NONE root @@ -50,10 +50,11 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 15 *************** - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa08948af8000 HEALTHY NONE /dev/sdb1 0xffffa08949ff8000 HEALTHY NONE /dev/sdc1 0xffffa08949e58000 HEALTHY NONE /dev/sdd1 + ** No histogram data available ** 0xffffa089413b8000 meta-domain seg-size count -------- ----- @@ -75,7 +76,7 @@ ADDR NAME 32.0MB: 0 64.0MB: 1 * 128.0MB: 4 **** - Approx. Median: 184.0MB + Approx. Median: 92.0MB ADDR STATE AUX DESCRIPTION ------------------------------------------------------------ 0xffffa08953aa4000 HEALTHY NONE root @@ -100,7 +101,7 @@ ADDR NAME 32.0MB: 0 64.0MB: 1 * 128.0MB: 4 **** - Approx. Median: 184.0MB + Approx. Median: 92.0MB 0xffffa08953aac000 HEALTHY NONE /tmp/dks0 0xffffa08953ab0000 HEALTHY NONE /tmp/dks1 0xffffa08953ab4000 HEALTHY NONE /tmp/dks2 diff --git a/tests/integration/data/regression_output/zfs/spa -vmH b/tests/integration/data/regression_output/zfs/spa -vmH index 2fa8e0c1..b32dd225 100644 --- a/tests/integration/data/regression_output/zfs/spa -vmH +++ b/tests/integration/data/regression_output/zfs/spa -vmH @@ -23,7 +23,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 15 *************** - Approx. Median: 384.0MB + Approx. Median: 192.0MB ADDR STATE AUX DESCRIPTION ------------------------------------------------------------ 0xffffa089486fc000 HEALTHY NONE root @@ -50,7 +50,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 15 *************** - Approx. Median: 384.0MB + Approx. Median: 192.0MB ADDR ID OFFSET FREE FRAG UCMU ----------------------------------------------------------------- 0xffffa0894e6e1000 0 0x0 511MB 0% 8KB @@ -76,7 +76,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e6e4000 1 0x20000000 511MB 0% 8KB seg-size count -------- ----- @@ -100,7 +100,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e6e2800 2 0x40000000 511MB 0% 8KB seg-size count -------- ----- @@ -124,7 +124,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e6e3800 3 0x60000000 511MB 0% 8KB seg-size count -------- ----- @@ -148,7 +148,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e6e3000 4 0x80000000 511MB 0% 8KB seg-size count -------- ----- @@ -172,7 +172,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e6e4800 5 0xa0000000 511MB 0% 8KB seg-size count -------- ----- @@ -196,7 +196,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e6e7800 6 0xc0000000 511MB 0% 4KB seg-size count -------- ----- @@ -220,7 +220,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e6e2000 7 0xe0000000 511MB 0% 8KB seg-size count -------- ----- @@ -244,7 +244,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e637800 8 0x100000000 511MB 0% 8KB seg-size count -------- ----- @@ -268,7 +268,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e634800 9 0x120000000 511MB 0% 4KB seg-size count -------- ----- @@ -291,7 +291,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e633000 10 0x140000000 511MB 0% 4KB seg-size count -------- ----- @@ -314,7 +314,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e633800 11 0x160000000 509MB 0% 4KB seg-size count -------- ----- @@ -338,7 +338,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e632800 12 0x180000000 511MB 0% 4KB seg-size count -------- ----- @@ -362,7 +362,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e634000 13 0x1a0000000 511MB 0% 4KB seg-size count -------- ----- @@ -386,7 +386,7 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa0894e631000 14 0x1c0000000 511MB 0% 4KB seg-size count -------- ----- @@ -410,10 +410,11 @@ ADDR NAME 64.0MB: 0 128.0MB: 0 256.0MB: 1 * - Approx. Median: 384.0MB + Approx. Median: 192.0MB 0xffffa08948af8000 HEALTHY NONE /dev/sdb1 0xffffa08949ff8000 HEALTHY NONE /dev/sdc1 0xffffa08949e58000 HEALTHY NONE /dev/sdd1 + ** No histogram data available ** ADDR ID OFFSET FREE FRAG UCMU ----------------------------------------------------------------- 0xffffa0894e631800 0 0x0 512MB 0% 0B @@ -452,7 +453,7 @@ ADDR NAME 32.0MB: 0 64.0MB: 1 * 128.0MB: 4 **** - Approx. Median: 184.0MB + Approx. Median: 92.0MB ADDR STATE AUX DESCRIPTION ------------------------------------------------------------ 0xffffa08953aa4000 HEALTHY NONE root @@ -477,7 +478,7 @@ ADDR NAME 32.0MB: 0 64.0MB: 1 * 128.0MB: 4 **** - Approx. Median: 184.0MB + Approx. Median: 92.0MB ADDR ID OFFSET FREE FRAG UCMU ----------------------------------------------------------------- 0xffffa0894c701000 0 0x0 256MB 0% 0B @@ -501,7 +502,7 @@ ADDR NAME 16.0MB: 0 32.0MB: 0 64.0MB: 1 * - Approx. Median: 95.9MB + Approx. Median: 48.0MB 0xffffa0894c700800 2 0x20000000 255MB 0% 8KB seg-size count -------- ----- @@ -523,7 +524,7 @@ ADDR NAME 32.0MB: 0 64.0MB: 0 128.0MB: 1 * - Approx. Median: 191.9MB + Approx. Median: 96.0MB 0xffffa0894c706000 3 0x30000000 255MB 0% 8KB seg-size count -------- ----- @@ -545,7 +546,7 @@ ADDR NAME 32.0MB: 0 64.0MB: 0 128.0MB: 1 * - Approx. Median: 192.0MB + Approx. Median: 96.0MB 0xffffa0894c707000 4 0x40000000 223MB 0% 4KB seg-size count -------- ----- @@ -567,12 +568,12 @@ ADDR NAME 32.0MB: 0 64.0MB: 0 128.0MB: 1 * - Approx. Median: 192.0MB + Approx. Median: 96.0MB 0xffffa0894c706800 5 0x50000000 255MB 0% 4KB seg-size count -------- ----- 128.0MB: 1 * - Approx. Median: 192.0MB + Approx. Median: 96.0MB 0xffffa0894c703000 6 0x60000000 256MB 0% 0B 0xffffa0894c703800 7 0x70000000 256MB 0% 0B 0xffffa0894c705000 8 0x80000000 256MB 0% 0B diff --git a/tests/integration/data/regression_output/zfs/spa data | member spa_normal_class.mc_histogram | zfs_histogram b/tests/integration/data/regression_output/zfs/spa data | member spa_normal_class.mc_histogram | zfs_histogram index f3a5db08..54a3ac16 100644 --- a/tests/integration/data/regression_output/zfs/spa data | member spa_normal_class.mc_histogram | zfs_histogram +++ b/tests/integration/data/regression_output/zfs/spa data | member spa_normal_class.mc_histogram | zfs_histogram @@ -20,4 +20,4 @@ seg-size count 64.0MB: 0 128.0MB: 0 256.0MB: 15 *************** -Approx. Median: 384.0MB +Approx. Median: 192.0MB diff --git a/tests/integration/data/regression_output/zfs/spa data | vdev | metaslab | filter 'obj.ms_loaded == 1' | head 1 | member ms_allocatable.rt_histogram | zhist b/tests/integration/data/regression_output/zfs/spa data | vdev | metaslab | filter 'obj.ms_loaded == 1' | head 1 | member ms_allocatable.rt_histogram | zhist index 3ae1fc30..af035907 100644 --- a/tests/integration/data/regression_output/zfs/spa data | vdev | metaslab | filter 'obj.ms_loaded == 1' | head 1 | member ms_allocatable.rt_histogram | zhist +++ b/tests/integration/data/regression_output/zfs/spa data | vdev | metaslab | filter 'obj.ms_loaded == 1' | head 1 | member ms_allocatable.rt_histogram | zhist @@ -19,4 +19,4 @@ seg-size count 64.0MB: 0 128.0MB: 0 256.0MB: 1 * -Approx. Median: 384.0MB +Approx. Median: 192.0MB diff --git a/tests/integration/data/regression_output/zfs/spa data | vdev | metaslab | filter 'obj.ms_loaded == 1' | head 1 | member ms_sm.sm_phys.smp_histogram | zhist b/tests/integration/data/regression_output/zfs/spa data | vdev | metaslab | filter 'obj.ms_loaded == 1' | head 1 | member ms_sm.sm_phys.smp_histogram | zhist index 1d71d7a5..4a78270f 100644 --- a/tests/integration/data/regression_output/zfs/spa data | vdev | metaslab | filter 'obj.ms_loaded == 1' | head 1 | member ms_sm.sm_phys.smp_histogram | zhist +++ b/tests/integration/data/regression_output/zfs/spa data | vdev | metaslab | filter 'obj.ms_loaded == 1' | head 1 | member ms_sm.sm_phys.smp_histogram | zhist @@ -20,4 +20,4 @@ seg-size count 128.0KB: 0 256.0KB: 0 512.0KB: 1 * -Approx. Median: 768.0KB +Approx. Median: 384.0KB diff --git a/tests/integration/data/regression_output/zfs/spa data | vdev | metaslab | filter 'obj.ms_loaded == 1' | head 1 | member ms_sm.sm_phys.smp_histogram | zhist 9 b/tests/integration/data/regression_output/zfs/spa data | vdev | metaslab | filter 'obj.ms_loaded == 1' | head 1 | member ms_sm.sm_phys.smp_histogram | zhist 9 index 3c37397f..9538b4c8 100644 --- a/tests/integration/data/regression_output/zfs/spa data | vdev | metaslab | filter 'obj.ms_loaded == 1' | head 1 | member ms_sm.sm_phys.smp_histogram | zhist 9 +++ b/tests/integration/data/regression_output/zfs/spa data | vdev | metaslab | filter 'obj.ms_loaded == 1' | head 1 | member ms_sm.sm_phys.smp_histogram | zhist 9 @@ -20,4 +20,4 @@ seg-size count 64.0MB: 0 128.0MB: 0 256.0MB: 1 * -Approx. Median: 384.0MB +Approx. Median: 192.0MB