stat: rename add_lat_percentile_sample_noprio()
authorNiklas Cassel <niklas.cassel@wdc.com>
Thu, 25 Nov 2021 13:20:31 +0000 (13:20 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 25 Nov 2021 16:03:10 +0000 (09:03 -0700)
add_lat_percentile_sample_noprio() is the regular function to add a latency
percentile sample. It adds a regular sample (it doesn't add any per
priority sample). Therefore, it makes sense that this function has no
suffix, neither _noprio nor _prio.

Drop the _noprio suffix from add_lat_percentile_sample_noprio(), to make it
more obvious that this function should be used if you want to add a regular
percentile sample.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Link: https://lore.kernel.org/r/20211125132020.109955-5-Niklas.Cassel@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
stat.c

diff --git a/stat.c b/stat.c
index 1e0da99dd43f594bdc38d4b90c9e63787183a073..28e49a89bf3a52bf3f139a61c85258d4118bba2a 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -3052,8 +3052,9 @@ 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_noprio(struct thread_stat *ts,
-                               unsigned long long nsec, enum fio_ddir ddir, enum fio_lat lat)
+static 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);
@@ -3068,7 +3069,7 @@ static void add_lat_percentile_prio_sample(struct thread_stat *ts,
 {
        unsigned int idx = plat_val_to_idx(nsec);
 
-       add_lat_percentile_sample_noprio(ts, nsec, ddir, lat);
+       add_lat_percentile_sample(ts, nsec, ddir, lat);
 
        if (!high_prio)
                ts->io_u_plat_low_prio[ddir][idx]++;
@@ -3117,7 +3118,7 @@ void add_clat_sample(struct thread_data *td, enum fio_ddir ddir,
                 * the prio lat percentile sample when lat_percentiles=1.
                 */
                if (ts->lat_percentiles)
-                       add_lat_percentile_sample_noprio(ts, nsec, ddir, FIO_CLAT);
+                       add_lat_percentile_sample(ts, nsec, ddir, FIO_CLAT);
                else
                        add_lat_percentile_prio_sample(ts, nsec, ddir, high_prio,
                                                       FIO_CLAT);
@@ -3185,7 +3186,7 @@ void add_slat_sample(struct thread_data *td, enum fio_ddir ddir,
                               offset, ioprio);
 
        if (ts->slat_percentiles)
-               add_lat_percentile_sample_noprio(ts, nsec, ddir, FIO_SLAT);
+               add_lat_percentile_sample(ts, nsec, ddir, FIO_SLAT);
 
        if (needs_lock)
                __td_io_u_unlock(td);