From ed7f3a07363d62c6d6147b0c568f87f079d241a8 Mon Sep 17 00:00:00 2001 From: Niklas Cassel Date: Thu, 25 Nov 2021 13:20:32 +0000 Subject: [PATCH] stat: make add lat percentile functions inline Now that add_lat_percentile_prio_sample() has been simplified, make both add lat percentile functions inline, just like add_stat_sample(). Signed-off-by: Niklas Cassel Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20211125132020.109955-7-Niklas.Cassel@wdc.com Signed-off-by: Jens Axboe --- stat.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/stat.c b/stat.c index f78899c8..7e84058d 100644 --- a/stat.c +++ b/stat.c @@ -3052,9 +3052,10 @@ void add_sync_clat_sample(struct thread_stat *ts, unsigned long long nsec) add_stat_sample(&ts->sync_stat, nsec); } -static void add_lat_percentile_sample(struct thread_stat *ts, - unsigned long long nsec, - enum fio_ddir ddir, enum fio_lat lat) +static inline void add_lat_percentile_sample(struct thread_stat *ts, + unsigned long long nsec, + enum fio_ddir ddir, + enum fio_lat lat) { unsigned int idx = plat_val_to_idx(nsec); assert(idx < FIO_IO_U_PLAT_NR); @@ -3062,10 +3063,10 @@ static void add_lat_percentile_sample(struct thread_stat *ts, ts->io_u_plat[lat][ddir][idx]++; } -static void add_lat_percentile_prio_sample(struct thread_stat *ts, - unsigned long long nsec, - enum fio_ddir ddir, - bool high_prio) +static inline void add_lat_percentile_prio_sample(struct thread_stat *ts, + unsigned long long nsec, + enum fio_ddir ddir, + bool high_prio) { unsigned int idx = plat_val_to_idx(nsec); -- 2.25.1