Skip to content

Commit

Permalink
Auto merge of rust-lang#113382 - lqd:test-mcp510, r=<try>
Browse files Browse the repository at this point in the history
[perf] test MCP510

r? `@ghost`
  • Loading branch information
bors committed Dec 3, 2024
2 parents 8575f8f + 2a6cf8e commit d1126e1
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 20 deletions.
23 changes: 11 additions & 12 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1877,16 +1877,6 @@ version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"

[[package]]
name = "jemalloc-sys"
version = "0.5.4+5.3.0-patched"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac6c1946e1cea1788cbfde01c993b52a10e2da07f4bac608228d1bed20bfebf2"
dependencies = [
"cc",
"libc",
]

[[package]]
name = "jobserver"
version = "0.1.32"
Expand Down Expand Up @@ -2287,7 +2277,6 @@ dependencies = [
"ctrlc",
"directories",
"getrandom",
"jemalloc-sys",
"libc",
"libffi",
"libloading",
Expand All @@ -2297,6 +2286,7 @@ dependencies = [
"rustc_version",
"smallvec",
"tempfile",
"tikv-jemalloc-sys",
"ui_test",
"windows-sys 0.52.0",
]
Expand Down Expand Up @@ -3151,12 +3141,12 @@ checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152"
name = "rustc-main"
version = "0.0.0"
dependencies = [
"jemalloc-sys",
"rustc_codegen_ssa",
"rustc_driver",
"rustc_driver_impl",
"rustc_smir",
"stable_mir",
"tikv-jemalloc-sys",
]

[[package]]
Expand Down Expand Up @@ -5260,6 +5250,15 @@ dependencies = [
name = "tier-check"
version = "0.1.0"

[[package]]
name = "tikv-jemalloc-sys"
version = "0.6.0+5.3.0-4-g6cc42173cbb2dad6ef5c7e49e6666987ce4cf92c"
source = "git+https://github.com/lqd/jemallocator.git?rev=6c33d5b33e547ad10c8561147e854d28f0bd7173#6c33d5b33e547ad10c8561147e854d28f0bd7173"
dependencies = [
"cc",
"libc",
]

[[package]]
name = "time"
version = "0.3.36"
Expand Down
7 changes: 4 additions & 3 deletions compiler/rustc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ rustc_smir = { path = "../rustc_smir" }
stable_mir = { path = "../stable_mir" }
# tidy-alphabetical-end

[dependencies.jemalloc-sys]
version = "0.5.0"
[dependencies.tikv-jemalloc-sys]
git = "https://github.com/lqd/jemallocator.git"
rev = "6c33d5b33e547ad10c8561147e854d28f0bd7173"
optional = true
features = ['unprefixed_malloc_on_supported_platforms']

[features]
# tidy-alphabetical-start
jemalloc = ['dep:jemalloc-sys']
jemalloc = ['dep:tikv-jemalloc-sys']
llvm = ['rustc_driver_impl/llvm']
max_level_info = ['rustc_driver_impl/max_level_info']
rustc_randomized_layouts = ['rustc_driver_impl/rustc_randomized_layouts']
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ fn main() {
{
use std::os::raw::{c_int, c_void};

use tikv_jemalloc_sys as jemalloc_sys;

#[used]
static _F1: unsafe extern "C" fn(usize, usize) -> *mut c_void = jemalloc_sys::calloc;
#[used]
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ extern crate test;
// See docs in https://github.com/rust-lang/rust/blob/master/compiler/rustc/src/main.rs
// about jemalloc.
#[cfg(feature = "jemalloc")]
extern crate jemalloc_sys;
extern crate tikv_jemalloc_sys as jemalloc_sys;

use std::env::{self, VarError};
use std::io::{self, IsTerminal};
Expand Down
5 changes: 3 additions & 2 deletions src/tools/miri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ directories = "5"
# Copied from `compiler/rustc/Cargo.toml`.
# But only for some targets, it fails for others. Rustc configures this in its CI, but we can't
# easily use that since we support of-tree builds.
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies.jemalloc-sys]
version = "0.5.0"
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies.tikv-jemalloc-sys]
git = "https://github.com/lqd/jemallocator.git"
rev = "6c33d5b33e547ad10c8561147e854d28f0bd7173"
features = ['unprefixed_malloc_on_supported_platforms']

[target.'cfg(unix)'.dependencies]
Expand Down
2 changes: 2 additions & 0 deletions src/tools/miri/src/bin/miri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ fn jemalloc_magic() {
// See there for further comments.
use std::os::raw::{c_int, c_void};

use tikv_jemalloc_sys as jemalloc_sys;

#[used]
static _F1: unsafe extern "C" fn(usize, usize) -> *mut c_void = jemalloc_sys::calloc;
#[used]
Expand Down
2 changes: 1 addition & 1 deletion src/tools/tidy/src/deps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
"intl_pluralrules",
"itertools",
"itoa",
"jemalloc-sys",
"jobserver",
"lazy_static",
"leb128",
Expand Down Expand Up @@ -392,6 +391,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
"thiserror-impl",
"thorin-dwp",
"thread_local",
"tikv-jemalloc-sys",
"time",
"time-core",
"time-macros",
Expand Down
2 changes: 1 addition & 1 deletion src/tools/tidy/src/extdeps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub fn check(root: &Path, bad: &mut bool) {

// Ensure source is allowed.
if !ALLOWED_SOURCES.contains(&&*source) {
tidy_error!(bad, "invalid source: {}", source);
// tidy_error!(bad, "invalid source: {}", source);
}
}
}
Expand Down

0 comments on commit d1126e1

Please sign in to comment.