Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regressions #346

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions sdb/commands/echo.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ def _init_parser(cls, name: str) -> argparse.ArgumentParser:
return parser

def _call(self, objs: Iterable[drgn.Object]) -> Iterable[drgn.Object]:
for obj in objs:
yield obj
yield from objs

for addr in self.args.addrs:
try:
Expand Down
3 changes: 3 additions & 0 deletions sdb/commands/linux/internal/slub_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ def util(cache: drgn.Object) -> int:

def lookup_cache_by_address(obj: drgn.Object) -> Optional[drgn.Object]:
try:
# The pylint error disabled below is a false positive
# triggered by some updates to drgn's function signatures.
# pylint: disable=no-value-for-parameter
cache = find_containing_slab_cache(obj)
if cache.value_() == 0x0:
return None
Expand Down
6 changes: 6 additions & 0 deletions sdb/commands/linux/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ def _init_parser(cls, name: str) -> argparse.ArgumentParser:

def _call(self, objs: Iterable[drgn.Object]) -> Iterable[drgn.Object]:
for pid in self.args.pid:
# The pylint error disabled below is a false positive
# triggered by some updates to drgn's function signatures.
# pylint: disable=no-value-for-parameter
yield find_pid(sdb.get_prog(), pid)


Expand Down Expand Up @@ -90,4 +93,7 @@ def _init_parser(cls, name: str) -> argparse.ArgumentParser:

def _call(self, objs: Iterable[drgn.Object]) -> Iterable[drgn.Object]:
for pid in self.args.pid:
# The pylint error disabled below is a false positive
# triggered by some updates to drgn's function signatures.
# pylint: disable=no-value-for-parameter
yield find_task(sdb.get_prog(), pid)
3 changes: 3 additions & 0 deletions sdb/commands/linux/stacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,9 @@ def pretty_print(self, objs: Iterable[drgn.Object]) -> None:

def no_input(self) -> Iterable[drgn.Object]:
self.validate_context()
# The pylint error disabled below is a false positive
# triggered by some updates to drgn's function signatures.
# pylint: disable=no-value-for-parameter
yield from filter(self.match_stack, for_each_task(sdb.get_prog()))


Expand Down
8 changes: 7 additions & 1 deletion sdb/commands/linux/threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@

def _cmdline(obj: drgn.Object) -> str:
try:
s = " ".join(map(lambda s: s.decode("utf-8"), cmdline(obj)))
ret = cmdline(obj)
if ret is None:
return ""
s = " ".join(map(lambda s: s.decode("utf-8"), ret))

#
# The command line for a given thread can be obnoxiously long,
Expand Down Expand Up @@ -97,4 +100,7 @@ def pretty_print(self, objs: Iterable[drgn.Object]) -> None:
table.print_()

def no_input(self) -> Iterable[drgn.Object]:
# The pylint error disabled below is a false positive
# triggered by some updates to drgn's function signatures.
# pylint: disable=no-value-for-parameter
yield from for_each_task(sdb.get_prog())
3 changes: 1 addition & 2 deletions sdb/commands/tail.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,4 @@ def _call(self, objs: Iterable[drgn.Object]) -> Iterable[drgn.Object]:
queue: Deque[drgn.Object] = deque(maxlen=self.args.count)
for obj in objs:
queue.append(obj)
for obj in queue:
yield obj
yield from queue
3 changes: 1 addition & 2 deletions sdb/commands/zfs/histograms.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ def print_histogram(hist: drgn.Object,
min_bucket = bucket
if bucket > max_bucket and count > 0:
max_bucket = bucket
if count > max_count:
max_count = count
max_count = max(max_count, count)

HISTOGRAM_WIDTH_MAX = 40
max_count = max(max_count, HISTOGRAM_WIDTH_MAX)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,7 @@
0xffff9ac552bea780 WRITE VDEV_IO_START - -
0xffff9ac5500d1da0 WRITE VDEV_IO_DONE - -62ms
0xffff9ac60f5d4f00 WRITE VDEV_IO_START - -78ms
0xffff9ac552beac70 WRITE DONE - -
0xffff9ac552bed8e0 WRITE VDEV_IO_START - -
0xffff9ac5500d4520 WRITE VDEV_IO_DONE - -63ms
0xffff9ac60f5d4f00 WRITE VDEV_IO_START - -78ms
Expand Down
Loading