Skip to content

Commit

Permalink
Wire up reuse size class experiment.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 684900571
Change-Id: I3e7c1257039bbc15454cc1f9704bef8e5a549d5e
  • Loading branch information
v-gogte authored and copybara-github committed Oct 11, 2024
1 parent f3e160c commit f5ce837
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tcmalloc/experiment_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ enum class Experiment : int {
TEST_ONLY_TCMALLOC_SHARDED_TRANSFER_CACHE,
TEST_ONLY_TCMALLOC_HUGE_CACHE_RELEASE_30S, // TODO(b/319872040): Complete experiment.
TEST_ONLY_TCMALLOC_REUSE_SIZE_CLASSES, // TODO(b/358126781): Complete experiment.
TCMALLOC_REUSE_SIZE_CLASSES, // TODO(b/358126781): Complete experiment.
TCMALLOC_HUGE_REGION_DEMAND_BASED_RELEASE, // TODO(b/328440160): Complete experiment.
TEST_ONLY_TCMALLOC_BIG_SPAN, // TODO(b/304135905): Complete experiment.
TCMALLOC_BIG_SPAN, // TODO(b/304135905): Complete experiment.
Expand All @@ -46,6 +47,7 @@ inline constexpr ExperimentConfig experiments[] = {
{Experiment::TEST_ONLY_TCMALLOC_SHARDED_TRANSFER_CACHE, "TEST_ONLY_TCMALLOC_SHARDED_TRANSFER_CACHE"},
{Experiment::TEST_ONLY_TCMALLOC_HUGE_CACHE_RELEASE_30S, "TEST_ONLY_TCMALLOC_HUGE_CACHE_RELEASE_30S"},
{Experiment::TEST_ONLY_TCMALLOC_REUSE_SIZE_CLASSES, "TEST_ONLY_TCMALLOC_REUSE_SIZE_CLASSES"},
{Experiment::TCMALLOC_REUSE_SIZE_CLASSES, "TCMALLOC_REUSE_SIZE_CLASSES"},
{Experiment::TCMALLOC_HUGE_REGION_DEMAND_BASED_RELEASE, "TCMALLOC_HUGE_REGION_DEMAND_BASED_RELEASE"},
{Experiment::TEST_ONLY_TCMALLOC_BIG_SPAN, "TEST_ONLY_TCMALLOC_BIG_SPAN"},
{Experiment::TCMALLOC_BIG_SPAN, "TCMALLOC_BIG_SPAN"},
Expand Down
3 changes: 2 additions & 1 deletion tcmalloc/static_vars.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ SizeClassConfiguration Static::size_class_configuration() {
// TODO(b/242710633): remove this opt out.
return SizeClassConfiguration::kLegacy;
} else if (IsExperimentActive(
Experiment::TEST_ONLY_TCMALLOC_REUSE_SIZE_CLASSES)) {
Experiment::TEST_ONLY_TCMALLOC_REUSE_SIZE_CLASSES) ||
IsExperimentActive(Experiment::TCMALLOC_REUSE_SIZE_CLASSES)) {
return SizeClassConfiguration::kReuse;
} else {
return SizeClassConfiguration::kPow2Below64;
Expand Down

0 comments on commit f5ce837

Please sign in to comment.