Remove highruns statistics.
diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in
index f9f1475..4c7023b 100644
--- a/doc/jemalloc.xml.in
+++ b/doc/jemalloc.xml.in
@@ -1868,17 +1868,6 @@
<varlistentry>
<term>
- <mallctl>stats.arenas.<i>.bins.<j>.highruns</mallctl>
- (<type>size_t</type>)
- <literal>r-</literal>
- [<option>--enable-stats</option>]
- </term>
- <listitem><para>Maximum number of runs at any time thus far.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
<mallctl>stats.arenas.<i>.bins.<j>.curruns</mallctl>
(<type>size_t</type>)
<literal>r-</literal>
@@ -1922,17 +1911,6 @@
<varlistentry>
<term>
- <mallctl>stats.arenas.<i>.lruns.<j>.highruns</mallctl>
- (<type>size_t</type>)
- <literal>r-</literal>
- [<option>--enable-stats</option>]
- </term>
- <listitem><para>Maximum number of runs at any time thus far for this
- size class.</para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
<mallctl>stats.arenas.<i>.lruns.<j>.curruns</mallctl>
(<type>size_t</type>)
<literal>r-</literal>
diff --git a/include/jemalloc/internal/arena.h b/include/jemalloc/internal/arena.h
index cacb03f..4a87ef5 100644
--- a/include/jemalloc/internal/arena.h
+++ b/include/jemalloc/internal/arena.h
@@ -639,6 +639,10 @@
else
return (arena_malloc_small(choose_arena(), size, zero));
} else {
+ /*
+ * Initialize tcache after checking size in order to avoid
+ * infinite recursion during tcache initialization.
+ */
if (size <= tcache_maxclass && (tcache = tcache_get()) != NULL)
return (tcache_alloc_large(tcache, size, zero));
else
diff --git a/include/jemalloc/internal/stats.h b/include/jemalloc/internal/stats.h
index 64ba4bd..4af23c3 100644
--- a/include/jemalloc/internal/stats.h
+++ b/include/jemalloc/internal/stats.h
@@ -59,9 +59,6 @@
*/
uint64_t reruns;
- /* High-water mark for this bin. */
- size_t highruns;
-
/* Current number of runs in this bin. */
size_t curruns;
};
@@ -83,9 +80,6 @@
*/
uint64_t nrequests;
- /* High-water mark for this size class. */
- size_t highruns;
-
/* Current number of runs of this size class. */
size_t curruns;
};
diff --git a/src/arena.c b/src/arena.c
index 32afd0c..bd10de3 100644
--- a/src/arena.c
+++ b/src/arena.c
@@ -1196,8 +1196,6 @@
if (config_stats) {
bin->stats.nruns++;
bin->stats.curruns++;
- if (bin->stats.curruns > bin->stats.highruns)
- bin->stats.highruns = bin->stats.curruns;
}
return (run);
}
@@ -1401,12 +1399,6 @@
arena->stats.lstats[(size >> PAGE_SHIFT) - 1].nmalloc++;
arena->stats.lstats[(size >> PAGE_SHIFT) - 1].nrequests++;
arena->stats.lstats[(size >> PAGE_SHIFT) - 1].curruns++;
- if (arena->stats.lstats[(size >> PAGE_SHIFT) - 1].curruns >
- arena->stats.lstats[(size >> PAGE_SHIFT) - 1].highruns) {
- arena->stats.lstats[(size >> PAGE_SHIFT) - 1].highruns =
- arena->stats.lstats[(size >> PAGE_SHIFT)
- - 1].curruns;
- }
}
if (config_prof)
arena_prof_accum(arena, size);
@@ -1477,12 +1469,6 @@
arena->stats.lstats[(size >> PAGE_SHIFT) - 1].nmalloc++;
arena->stats.lstats[(size >> PAGE_SHIFT) - 1].nrequests++;
arena->stats.lstats[(size >> PAGE_SHIFT) - 1].curruns++;
- if (arena->stats.lstats[(size >> PAGE_SHIFT) - 1].curruns >
- arena->stats.lstats[(size >> PAGE_SHIFT) - 1].highruns) {
- arena->stats.lstats[(size >> PAGE_SHIFT) - 1].highruns =
- arena->stats.lstats[(size >> PAGE_SHIFT)
- - 1].curruns;
- }
}
malloc_mutex_unlock(&arena->lock);
@@ -1762,7 +1748,6 @@
lstats[i].nmalloc += arena->stats.lstats[i].nmalloc;
lstats[i].ndalloc += arena->stats.lstats[i].ndalloc;
lstats[i].nrequests += arena->stats.lstats[i].nrequests;
- lstats[i].highruns += arena->stats.lstats[i].highruns;
lstats[i].curruns += arena->stats.lstats[i].curruns;
}
malloc_mutex_unlock(&arena->lock);
@@ -1781,7 +1766,6 @@
}
bstats[i].nruns += bin->stats.nruns;
bstats[i].reruns += bin->stats.reruns;
- bstats[i].highruns += bin->stats.highruns;
bstats[i].curruns += bin->stats.curruns;
malloc_mutex_unlock(&bin->lock);
}
@@ -1835,12 +1819,6 @@
arena->stats.lstats[(size >> PAGE_SHIFT) - 1].nmalloc++;
arena->stats.lstats[(size >> PAGE_SHIFT) - 1].nrequests++;
arena->stats.lstats[(size >> PAGE_SHIFT) - 1].curruns++;
- if (arena->stats.lstats[(size >> PAGE_SHIFT) - 1].curruns >
- arena->stats.lstats[(size >> PAGE_SHIFT) - 1].highruns) {
- arena->stats.lstats[(size >> PAGE_SHIFT) - 1].highruns =
- arena->stats.lstats[(size >> PAGE_SHIFT)
- - 1].curruns;
- }
}
malloc_mutex_unlock(&arena->lock);
}
@@ -1909,13 +1887,6 @@
arena->stats.lstats[(size >> PAGE_SHIFT)
- 1].nrequests++;
arena->stats.lstats[(size >> PAGE_SHIFT) - 1].curruns++;
- if (arena->stats.lstats[(size >> PAGE_SHIFT)
- - 1].curruns > arena->stats.lstats[(size >>
- PAGE_SHIFT) - 1].highruns) {
- arena->stats.lstats[(size >> PAGE_SHIFT)
- - 1].highruns = arena->stats.lstats[(size >>
- PAGE_SHIFT) - 1].curruns;
- }
}
malloc_mutex_unlock(&arena->lock);
return (false);
diff --git a/src/ctl.c b/src/ctl.c
index 6d0423f..e33ce67 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -136,13 +136,11 @@
CTL_PROTO(stats_arenas_i_bins_j_nflushes)
CTL_PROTO(stats_arenas_i_bins_j_nruns)
CTL_PROTO(stats_arenas_i_bins_j_nreruns)
-CTL_PROTO(stats_arenas_i_bins_j_highruns)
CTL_PROTO(stats_arenas_i_bins_j_curruns)
INDEX_PROTO(stats_arenas_i_bins_j)
CTL_PROTO(stats_arenas_i_lruns_j_nmalloc)
CTL_PROTO(stats_arenas_i_lruns_j_ndalloc)
CTL_PROTO(stats_arenas_i_lruns_j_nrequests)
-CTL_PROTO(stats_arenas_i_lruns_j_highruns)
CTL_PROTO(stats_arenas_i_lruns_j_curruns)
INDEX_PROTO(stats_arenas_i_lruns_j)
CTL_PROTO(stats_arenas_i_nthreads)
@@ -322,7 +320,6 @@
{NAME("nflushes"), CTL(stats_arenas_i_bins_j_nflushes)},
{NAME("nruns"), CTL(stats_arenas_i_bins_j_nruns)},
{NAME("nreruns"), CTL(stats_arenas_i_bins_j_nreruns)},
- {NAME("highruns"), CTL(stats_arenas_i_bins_j_highruns)},
{NAME("curruns"), CTL(stats_arenas_i_bins_j_curruns)}
};
static const ctl_node_t super_stats_arenas_i_bins_j_node[] = {
@@ -337,7 +334,6 @@
{NAME("nmalloc"), CTL(stats_arenas_i_lruns_j_nmalloc)},
{NAME("ndalloc"), CTL(stats_arenas_i_lruns_j_ndalloc)},
{NAME("nrequests"), CTL(stats_arenas_i_lruns_j_nrequests)},
- {NAME("highruns"), CTL(stats_arenas_i_lruns_j_highruns)},
{NAME("curruns"), CTL(stats_arenas_i_lruns_j_curruns)}
};
static const ctl_node_t super_stats_arenas_i_lruns_j_node[] = {
@@ -482,7 +478,6 @@
sstats->lstats[i].nmalloc += astats->lstats[i].nmalloc;
sstats->lstats[i].ndalloc += astats->lstats[i].ndalloc;
sstats->lstats[i].nrequests += astats->lstats[i].nrequests;
- sstats->lstats[i].highruns += astats->lstats[i].highruns;
sstats->lstats[i].curruns += astats->lstats[i].curruns;
}
@@ -498,7 +493,6 @@
}
sstats->bstats[i].nruns += astats->bstats[i].nruns;
sstats->bstats[i].reruns += astats->bstats[i].reruns;
- sstats->bstats[i].highruns += astats->bstats[i].highruns;
sstats->bstats[i].curruns += astats->bstats[i].curruns;
}
}
@@ -1351,8 +1345,6 @@
ctl_stats.arenas[mib[2]].bstats[mib[4]].nruns, uint64_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_bins_j_nreruns,
ctl_stats.arenas[mib[2]].bstats[mib[4]].reruns, uint64_t)
-CTL_RO_CGEN(config_stats, stats_arenas_i_bins_j_highruns,
- ctl_stats.arenas[mib[2]].bstats[mib[4]].highruns, size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_bins_j_curruns,
ctl_stats.arenas[mib[2]].bstats[mib[4]].curruns, size_t)
@@ -1373,8 +1365,6 @@
ctl_stats.arenas[mib[2]].lstats[mib[4]].nrequests, uint64_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_lruns_j_curruns,
ctl_stats.arenas[mib[2]].lstats[mib[4]].curruns, size_t)
-CTL_RO_CGEN(config_stats, stats_arenas_i_lruns_j_highruns,
- ctl_stats.arenas[mib[2]].lstats[mib[4]].highruns, size_t)
const ctl_node_t *
stats_arenas_i_lruns_j_index(const size_t *mib, size_t miblen, size_t j)
diff --git a/src/stats.c b/src/stats.c
index ad8cd13..1e90782 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -161,12 +161,11 @@
malloc_cprintf(write_cb, cbopaque,
"bins: bin size regs pgs allocated nmalloc"
" ndalloc nrequests nfills nflushes"
- " newruns reruns maxruns curruns\n");
+ " newruns reruns curruns\n");
} else {
malloc_cprintf(write_cb, cbopaque,
"bins: bin size regs pgs allocated nmalloc"
- " ndalloc newruns reruns maxruns"
- " curruns\n");
+ " ndalloc newruns reruns curruns\n");
}
CTL_GET("arenas.nbins", &nbins, unsigned);
for (j = 0, gap_start = UINT_MAX; j < nbins; j++) {
@@ -182,7 +181,7 @@
uint32_t nregs;
uint64_t nmalloc, ndalloc, nrequests, nfills, nflushes;
uint64_t reruns;
- size_t highruns, curruns;
+ size_t curruns;
if (gap_start != UINT_MAX) {
if (j > gap_start + 1) {
@@ -220,8 +219,6 @@
}
CTL_IJ_GET("stats.arenas.0.bins.0.nreruns", &reruns,
uint64_t);
- CTL_IJ_GET("stats.arenas.0.bins.0.highruns", &highruns,
- size_t);
CTL_IJ_GET("stats.arenas.0.bins.0.curruns", &curruns,
size_t);
if (config_tcache) {
@@ -229,27 +226,26 @@
"%13u %1s %5zu %4u %3zu %12zu %12"PRIu64
" %12"PRIu64" %12"PRIu64" %12"PRIu64
" %12"PRIu64" %12"PRIu64" %12"PRIu64
- " %12zu %12zu\n",
+ " %12zu\n",
j,
j < ntbins_ ? "T" : j < ntbins_ + nqbins ?
"Q" : j < ntbins_ + nqbins + ncbins ? "C" :
"S",
reg_size, nregs, run_size / pagesize,
allocated, nmalloc, ndalloc, nrequests,
- nfills, nflushes, nruns, reruns, highruns,
- curruns);
+ nfills, nflushes, nruns, reruns, curruns);
} else {
malloc_cprintf(write_cb, cbopaque,
"%13u %1s %5zu %4u %3zu %12zu %12"PRIu64
" %12"PRIu64" %12"PRIu64" %12"PRIu64
- " %12zu %12zu\n",
+ " %12zu\n",
j,
j < ntbins_ ? "T" : j < ntbins_ + nqbins ?
"Q" : j < ntbins_ + nqbins + ncbins ? "C" :
"S",
reg_size, nregs, run_size / pagesize,
allocated, nmalloc, ndalloc, nruns, reruns,
- highruns, curruns);
+ curruns);
}
}
}
@@ -276,11 +272,11 @@
malloc_cprintf(write_cb, cbopaque,
"large: size pages nmalloc ndalloc nrequests"
- " maxruns curruns\n");
+ " curruns\n");
CTL_GET("arenas.nlruns", &nlruns, size_t);
for (j = 0, gap_start = -1; j < nlruns; j++) {
uint64_t nmalloc, ndalloc, nrequests;
- size_t run_size, highruns, curruns;
+ size_t run_size, curruns;
CTL_IJ_GET("stats.arenas.0.lruns.0.nmalloc", &nmalloc,
uint64_t);
@@ -293,8 +289,6 @@
gap_start = j;
} else {
CTL_J_GET("arenas.lrun.0.size", &run_size, size_t);
- CTL_IJ_GET("stats.arenas.0.lruns.0.highruns", &highruns,
- size_t);
CTL_IJ_GET("stats.arenas.0.lruns.0.curruns", &curruns,
size_t);
if (gap_start != -1) {
@@ -304,9 +298,9 @@
}
malloc_cprintf(write_cb, cbopaque,
"%13zu %5zu %12"PRIu64" %12"PRIu64" %12"PRIu64
- " %12zu %12zu\n",
+ " %12zu\n",
run_size, run_size / pagesize, nmalloc, ndalloc,
- nrequests, highruns, curruns);
+ nrequests, curruns);
}
}
if (gap_start != -1)