mirror_zfs/cmd
rilysh e8f4592a19 Avoid computing strlen() inside loops
Compiling with -O0 (no proper optimizations), strlen() call
in loops for comparing the size, isn't being called/initialized
before the actual loop gets started, which causes n-numbers of
strlen() calls (as long as the string is). Keeping the length
before entering in the loop is a good idea.

On some places, even with -O2, both GCC and Clang can't
recognize this pattern, which seem to happen in an array
of char pointer.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: rilysh <nightquick@proton.me>
Closes #16584
2024-11-05 15:43:52 -08:00
..
raidz_test Fix multiplication converted to larger type 2022-10-28 09:30:37 -07:00
zdb Avoid computing strlen() inside loops 2024-11-05 15:43:52 -08:00
zed zed: Add deadman-slot_off.sh zedlet 2024-11-04 10:49:53 -08:00
zfs Add support for zfs mount -R <filesystem> 2024-04-22 09:28:06 -07:00
zinject Add slow disk diagnosis to ZED 2024-04-29 13:50:05 -07:00
zpool Add compatibility file for GRUB versions up to v2.06 2024-11-05 15:43:52 -08:00
zpool_influxdb Do not report bytes skipped by scan as issued. 2023-06-30 08:47:13 -07:00
zstream Use memset to zero stack allocations containing unions 2024-07-17 14:54:47 -07:00
arc_summary Speculative prefetch for reordered requests 2024-04-19 10:13:38 -07:00
arcstat.in Fix arcstats for FreeBSD after zfetch support 2024-04-29 13:50:05 -07:00
dbufstat.in
fsck.zfs.in
Makefile.am
mount_zfs.c nvpair: Constify string functions 2023-03-14 15:25:50 -07:00
zfs_ids_to_path.c
zgenhostid.c
zhack.c Allow zhack label repair to restore detached devices. 2023-05-03 09:03:57 -07:00
zilstat.in zil: Add some more statistics. 2023-05-25 13:51:53 -07:00
ztest.c Avoid computing strlen() inside loops 2024-11-05 15:43:52 -08:00
zvol_wait