diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2022-11-07 22:51:16 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2022-11-07 22:51:16 +0200 |
commit | 49a59f6ca001c3ce9affa2c162b437aad021b4d5 (patch) | |
tree | ecda93ad0800b918786d5ea16e389a18521c678a /src/xz/hardware.c | |
parent | liblzma: Include cached memory in reported memusage in threaded decoder. (diff) | |
download | xz-49a59f6ca001c3ce9affa2c162b437aad021b4d5.tar.xz |
xz: Extend --robot --info-memory output.
Now it includes everything that the human-readable --info-memory shows.
Diffstat (limited to 'src/xz/hardware.c')
-rw-r--r-- | src/xz/hardware.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/xz/hardware.c b/src/xz/hardware.c index 8f6a86e4..1fdecea1 100644 --- a/src/xz/hardware.c +++ b/src/xz/hardware.c @@ -235,9 +235,22 @@ memlimit_show(const char *str, size_t str_columns, uint64_t value) extern void hardware_memlimit_show(void) { + uint32_t cputhreads = 1; +#ifdef MYTHREAD_ENABLED + cputhreads = lzma_cputhreads(); + if (cputhreads == 0) + cputhreads = 1; +#endif + if (opt_robot) { - printf("%" PRIu64 "\t%" PRIu64 "\t%" PRIu64 "\n", total_ram, - memlimit_compress, memlimit_decompress); + printf("%" PRIu64 "\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64 + "\t%" PRIu64 "\t%" PRIu32 "\n", + total_ram, + memlimit_compress, + memlimit_decompress, + hardware_memlimit_mtdec_get(), + memlimit_mt_default, + cputhreads); } else { const char *msgs[] = { _("Amount of physical memory (RAM):"), @@ -263,13 +276,6 @@ hardware_memlimit_show(void) width_max = w; } - uint32_t cputhreads = 1; -#ifdef MYTHREAD_ENABLED - cputhreads = lzma_cputhreads(); - if (cputhreads == 0) - cputhreads = 1; -#endif - puts(_("Hardware information:")); memlimit_show(msgs[0], width_max, total_ram); printf(" %-*s %" PRIu32 "\n", |