From a8220ab2d293bb7f4b014b79d16b2fb05090fa93 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Feb 2021 12:45:55 +0100 Subject: Adding upstream version 1.29.0. Signed-off-by: Daniel Baumann --- collectors/slabinfo.plugin/slabinfo.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'collectors/slabinfo.plugin/slabinfo.c') diff --git a/collectors/slabinfo.plugin/slabinfo.c b/collectors/slabinfo.plugin/slabinfo.c index b92bc8ac2..00e0d3913 100644 --- a/collectors/slabinfo.plugin/slabinfo.c +++ b/collectors/slabinfo.plugin/slabinfo.c @@ -163,12 +163,12 @@ struct slabinfo *read_file_slabinfo() { slabdebug("-> Reading procfile %s", PLUGIN_SLABINFO_PROCFILE); static procfile *ff = NULL; - static long slab_pagesize = 0; + static long slab_pagesize = 0; - if (unlikely(!slab_pagesize)) { - slab_pagesize = sysconf(_SC_PAGESIZE); - slabdebug(" Discovered pagesize: %ld", slab_pagesize); - } + if (unlikely(!slab_pagesize)) { + slab_pagesize = sysconf(_SC_PAGESIZE); + slabdebug(" Discovered pagesize: %ld", slab_pagesize); + } if(unlikely(!ff)) { ff = procfile_reopen(ff, PLUGIN_SLABINFO_PROCFILE, " ,:" , PROCFILE_FLAG_DEFAULT); @@ -191,7 +191,7 @@ struct slabinfo *read_file_slabinfo() { slabdebug(" Read %lu lines from procfile", (unsigned long)lines); for(l = 2; l < lines; l++) { if (unlikely(procfile_linewords(ff, l) < 14)) { - slabdebug(" Line %lu has only %lu words, skipping", (unsigned long)l, procfile_linewords(ff,l)); + slabdebug(" Line %zu has only %zu words, skipping", l, procfile_linewords(ff,l)); continue; } @@ -231,7 +231,7 @@ struct slabinfo *read_file_slabinfo() { else s->obj_filling = 0; - slabdebug(" Updated slab %s: %lu %lu %lu %lu %lu / %lu %lu %lu / %lu %lu %lu / %lu %lu %hhu", + slabdebug(" Updated slab %s: %"PRIu64" %"PRIu64" %"PRIu64" %"PRIu64" %"PRIu64" / %"PRIu64" %"PRIu64" %"PRIu64" / %"PRIu64" %"PRIu64" %"PRIu64" / %"PRIu64" %"PRIu64" %hhu", name, s->active_objs, s->num_objs, s->obj_size, s->obj_per_slab, s->pages_per_slab, s->tune_limit, s->tune_batchcnt, s->tune_shared_factor, s->data_active_slabs, s->data_num_slabs, s->data_shared_avail, @@ -304,7 +304,7 @@ unsigned int do_slab_stats(int update_every) { , "slabmemory" ); for (s = sactive; s; s = s->next) { - printf("SET %s = %lu\n" + printf("SET %s = %"PRIu64"\n" , s->name , s->mem_usage ); @@ -334,7 +334,7 @@ unsigned int do_slab_stats(int update_every) { , "slabwaste" ); for (s = sactive; s; s = s->next) { - printf("SET %s = %lu\n" + printf("SET %s = %"PRIu64"\n" , s->name , s->mem_waste ); -- cgit v1.2.3