diff options
author | Bartosz Golaszewski <bartekgola@gmail.com> | 2014-06-22 14:01:13 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2014-06-22 14:01:13 +0200 |
commit | 5d2e409ef8224dc32fde59702e8ec90b231441ed (patch) | |
tree | 1d73d4a99a495ba57bc5be8878dce3cefbb99e9f /procps/iostat.c | |
parent | f92f1d0181853b989f9377debb56902e3e21c9a8 (diff) | |
download | busybox-w32-5d2e409ef8224dc32fde59702e8ec90b231441ed.tar.gz busybox-w32-5d2e409ef8224dc32fde59702e8ec90b231441ed.tar.bz2 busybox-w32-5d2e409ef8224dc32fde59702e8ec90b231441ed.zip |
libbb: use a wrapper around sysconf(_SC_CLK_TCK) to save a few bytes
function old new delta
bb_sc_clk_tck - 10 +10
timescmd 118 113 -5
print_route 1763 1758 -5
mpstat_main 1288 1283 -5
iostat_main 1947 1942 -5
INET_setroute 879 871 -8
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/5 up/down: 10/-28) Total: -18 bytes
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps/iostat.c')
-rw-r--r-- | procps/iostat.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/procps/iostat.c b/procps/iostat.c index 978d23430..8d272c87c 100644 --- a/procps/iostat.c +++ b/procps/iostat.c | |||
@@ -109,11 +109,6 @@ enum { | |||
109 | OPT_m = 1 << 5, | 109 | OPT_m = 1 << 5, |
110 | }; | 110 | }; |
111 | 111 | ||
112 | static ALWAYS_INLINE unsigned get_user_hz(void) | ||
113 | { | ||
114 | return sysconf(_SC_CLK_TCK); | ||
115 | } | ||
116 | |||
117 | static ALWAYS_INLINE int this_is_smp(void) | 112 | static ALWAYS_INLINE int this_is_smp(void) |
118 | { | 113 | { |
119 | return (G.total_cpus > 1); | 114 | return (G.total_cpus > 1); |
@@ -414,7 +409,7 @@ int iostat_main(int argc UNUSED_PARAM, char **argv) | |||
414 | memset(&stats_data, 0, sizeof(stats_data)); | 409 | memset(&stats_data, 0, sizeof(stats_data)); |
415 | 410 | ||
416 | /* Get number of clock ticks per sec */ | 411 | /* Get number of clock ticks per sec */ |
417 | G.clk_tck = get_user_hz(); | 412 | G.clk_tck = bb_clk_tck(); |
418 | 413 | ||
419 | /* Determine number of CPUs */ | 414 | /* Determine number of CPUs */ |
420 | G.total_cpus = get_cpu_count(); | 415 | G.total_cpus = get_cpu_count(); |