-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27067 from benesch/prof-sanity
Allow force enabling jemalloc on macOS
- Loading branch information
Showing
20 changed files
with
206 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# generated by ci/test/lint-deps.sh -- see ci/test/lint-deps/README.md for details | ||
tikv_jemalloc_ctl | ||
0::default,jemalloc,mz-alloc-default,tokio-console | ||
1:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
2:mz_prof:jemalloc,tikv-jemalloc-ctl | ||
3:tikv_jemalloc_ctl:default,use_std | ||
tikv_jemallocator | ||
0::default,jemalloc,mz-alloc-default,tokio-console | ||
1:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
2:tikv_jemallocator:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
tikv_jemalloc_sys | ||
0::default,jemalloc,mz-alloc-default,tokio-console | ||
1:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
2:mz_prof:jemalloc,tikv-jemalloc-ctl | ||
3:tikv_jemalloc_ctl:default,use_std | ||
4:tikv_jemalloc_sys:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
2:tikv_jemallocator:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
3:tikv_jemalloc_sys:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms (*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# generated by ci/test/lint-deps.sh -- see ci/test/lint-deps/README.md for details | ||
tikv_jemalloc_ctl | ||
0::default,mz-alloc-default,tokio-console | ||
1:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
2:mz_prof:jemalloc,tikv-jemalloc-ctl | ||
3:tikv_jemalloc_ctl:default,use_std | ||
tikv_jemallocator | ||
0::default,mz-alloc-default,tokio-console | ||
1:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
2:tikv_jemallocator:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
tikv_jemalloc_sys | ||
0::default,mz-alloc-default,tokio-console | ||
1:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
2:mz_prof:jemalloc,tikv-jemalloc-ctl | ||
3:tikv_jemalloc_ctl:default,use_std | ||
4:tikv_jemalloc_sys:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
2:tikv_jemallocator:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
3:tikv_jemalloc_sys:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms (*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# generated by ci/test/lint-deps.sh -- see ci/test/lint-deps/README.md for details | ||
tikv_jemalloc_ctl | ||
0::default,jemalloc,mz-alloc-default,tokio-console | ||
1:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
2:mz_prof:jemalloc,tikv-jemalloc-ctl | ||
3:tikv_jemalloc_ctl:default,use_std | ||
tikv_jemallocator | ||
0::default,jemalloc,mz-alloc-default,tokio-console | ||
1:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
2:tikv_jemallocator:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
tikv_jemalloc_sys | ||
0::default,jemalloc,mz-alloc-default,tokio-console | ||
1:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
2:mz_prof:jemalloc,tikv-jemalloc-ctl | ||
3:tikv_jemalloc_ctl:default,use_std | ||
4:tikv_jemalloc_sys:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
2:tikv_jemallocator:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
3:tikv_jemalloc_sys:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms (*) |
1 change: 1 addition & 0 deletions
1
ci/test/lint-deps/aarch64-unknown-linux-gnu-no-default-features
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# generated by ci/test/lint-deps.sh -- see ci/test/lint-deps/README.md for details |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# generated by ci/test/lint-deps.sh -- see ci/test/lint-deps/README.md for details | ||
tikv_jemalloc_ctl | ||
0::default,jemalloc,mz-alloc-default,tokio-console | ||
1:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
2:mz_prof:jemalloc,tikv-jemalloc-ctl | ||
3:tikv_jemalloc_ctl:default,use_std | ||
tikv_jemallocator | ||
0::default,jemalloc,mz-alloc-default,tokio-console | ||
1:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
2:tikv_jemallocator:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
tikv_jemalloc_sys | ||
0::default,jemalloc,mz-alloc-default,tokio-console | ||
1:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
2:mz_prof:jemalloc,tikv-jemalloc-ctl | ||
3:tikv_jemalloc_ctl:default,use_std | ||
4:tikv_jemalloc_sys:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
2:tikv_jemallocator:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
3:tikv_jemalloc_sys:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms (*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
# generated by ci/test/lint-deps.sh -- see ci/test/lint-deps/README.md for details | ||
tikv_jemalloc_ctl | ||
0:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
1:mz_prof:default,jemalloc,tikv-jemalloc-ctl,workspace-hack | ||
2:tikv_jemalloc_ctl:default,use_std | ||
0::default,mz-alloc-default,tokio-console | ||
1:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
2:mz_prof:jemalloc,tikv-jemalloc-ctl | ||
3:tikv_jemalloc_ctl:default,use_std | ||
tikv_jemallocator | ||
0:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
1:tikv_jemallocator:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
0::default,mz-alloc-default,tokio-console | ||
1:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
2:tikv_jemallocator:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
tikv_jemalloc_sys | ||
0::default,mz-alloc-default,tokio-console | ||
1:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
2:mz_prof:jemalloc,tikv-jemalloc-ctl | ||
3:tikv_jemalloc_ctl:default,use_std | ||
4:tikv_jemalloc_sys:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
2:tikv_jemallocator:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
3:tikv_jemalloc_sys:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms (*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# generated by ci/test/lint-deps.sh -- see ci/test/lint-deps/README.md for details | ||
tikv_jemalloc_ctl | ||
0::default,jemalloc,mz-alloc-default,tokio-console | ||
1:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
2:mz_prof:jemalloc,tikv-jemalloc-ctl | ||
3:tikv_jemalloc_ctl:default,use_std | ||
tikv_jemallocator | ||
0::default,jemalloc,mz-alloc-default,tokio-console | ||
1:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
2:tikv_jemallocator:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
tikv_jemalloc_sys | ||
0::default,jemalloc,mz-alloc-default,tokio-console | ||
1:mz_alloc:default,jemalloc,tikv-jemallocator,workspace-hack | ||
2:mz_prof:jemalloc,tikv-jemalloc-ctl | ||
3:tikv_jemalloc_ctl:default,use_std | ||
4:tikv_jemalloc_sys:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
2:tikv_jemallocator:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms | ||
3:tikv_jemalloc_sys:background_threads,background_threads_runtime_support,default,profiling,stats,unprefixed_malloc_on_supported_platforms (*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[package] | ||
name = "mz-alloc-default" | ||
description = "Activates the best default global memory allocator for the platform." | ||
version = "0.0.0" | ||
edition.workspace = true | ||
rust-version.workspace = true | ||
publish = false | ||
|
||
[lints] | ||
workspace = true | ||
|
||
[dependencies] | ||
mz-alloc = { path = "../alloc", default-features = false } | ||
workspace-hack = { version = "0.0.0", path = "../workspace-hack", optional = true } | ||
|
||
# We use jemalloc by default on non-macOS platforms, as benchmarks indicated it | ||
# outperforms the system allocator, while also providing heap profiles. | ||
# | ||
# However, on macOS, we default to the system allocator, as jemalloc is not well | ||
# supported on macOS [0][1][2]. The issues present as runaway latency on load | ||
# test workloads that are comfortably handled by the macOS system allocator. | ||
# Consider re-evaluating if jemalloc's macOS support improves. | ||
# | ||
# [0]: https://github.com/jemalloc/jemalloc/issues/26 | ||
# [1]: https://github.com/jemalloc/jemalloc/issues/843 | ||
# [2]: https://github.com/jemalloc/jemalloc/issues/1467 | ||
# | ||
# Furthermore, as of August 2022, some engineers are using profiling tools, e.g. | ||
# `heaptrack`, that only work with the system allocator on macOS. | ||
[target.'cfg(not(target_os = "macos"))'.dependencies] | ||
mz-alloc = { path = "../alloc", features = ["jemalloc"] } | ||
|
||
[features] | ||
default = ["workspace-hack"] | ||
|
||
[package.metadata.cargo-udeps.ignore] | ||
normal = ["workspace-hack", "mz-alloc"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright Materialize, Inc. and contributors. All rights reserved. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the LICENSE file. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0. | ||
|
||
//! Activates the best default global memory allocator for the platform. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.