Skip to content

jemalloc! - #6895

Closed
emberian wants to merge 4 commits into
rust-lang:incomingfrom
emberian:jemalloc
Closed

emberian wants to merge 4 commits into
rust-lang:incomingfrom
emberian:jemalloc

Conversation

@emberian

@emberian emberian commented Jun 2, 2013

Copy link
Copy Markdown
Contributor

No description provided.

@emberian

emberian commented Jun 2, 2013

Copy link
Copy Markdown
Contributor Author

r? @brson

@brson

brson commented Jun 2, 2013

Copy link
Copy Markdown
Contributor

Woo! 🌟

@brson

brson commented Jun 2, 2013

Copy link
Copy Markdown
Contributor

This looks really great. I'm glad it was so easy to integrate.

Before landing, I'd like to collect some performance numbers on the three major platforms so we can say something about the impact it has. I opened #6897 on this, but may not be able to do it for a few days.

Pushing to try now.

@brson

brson commented Jun 2, 2013

Copy link
Copy Markdown
Contributor

I see the following error when I build on x86_64-linux

                                               ^~~~~~~~~~~~~~
/home/brian/dev/rust2/src/librustc/middle/kind.rs:15:0: 15:21 warning: unused import [-W unused-imports (default)]
/home/brian/dev/rust2/src/librustc/middle/kind.rs:15 use middle::pat_util;
                                                     ^~~~~~~~~~~~~~~~~~~~~
compile_and_link: x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/bin/rustc
error: linking with `cc` failed with code 1
note: cc arguments: -L/opt/devel/rust2/build/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib -m64 -o x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/bin/rustc x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/bin/rustc.o -L/opt/devel/rust2/build/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib -lstd-c3ca5d77d81b46c1-0.7-pre -L/opt/devel/rust2/build/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib -lextra-4782a756585a81-0.7-pre -L/opt/devel/rust2/build/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib -lsyntax-f25ff37b2c135ff-0.7-pre -L/opt/devel/rust2/build/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib -lrustc-ba32f36fc1ec12e-0.7-pre -lrustrt -lrt -lpthread -Lrustllvm -lrustllvm -lrt -ldl -lm -lmorestack -lrustrt -Wl,-rpath,$ORIGIN/../lib -Wl,-rpath,/opt/devel/rust2/build/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib -Wl,-rpath,/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib
note: /opt/devel/rust2/build/x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/librustrt.so: undefined reference to `pthread_atfork'
collect2: error: ld returned 1 exit status

error: aborting due to previous error
make: *** [x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/bin/rustc] Error 101

@pcwalton

pcwalton commented Jun 2, 2013

Copy link
Copy Markdown
Contributor

Isn't tcmalloc generally supposed to be faster? I feel like we should not make any moves here until we've concretely measured performance.

@emberian

emberian commented Jun 2, 2013

Copy link
Copy Markdown
Contributor Author

@pcwalton see #6897

@thestinger

Copy link
Copy Markdown
Contributor

@pcwalton: the problem with tcmalloc is that Google isn't including many of their Chromium improvements in the gperftools tcmalloc. The upstream jemalloc gets improvements from Facebook, Mozilla, FreeBSD, etc. and it seems to be better than the easily obtainable tcmalloc from gperftools.

We could extract tcmalloc from the Chromium source and compare to it but.... I'd rather use something that actually has stable releases, documentation and a standalone build system even if it's slightly slower.

@pcwalton

pcwalton commented Jun 2, 2013

Copy link
Copy Markdown
Contributor

Aha, never mind then. That's unfortunate re. tcmalloc, but I suppose it can't be helped.

@brson

brson commented Jun 3, 2013

Copy link
Copy Markdown
Contributor

@emberian

emberian commented Jun 5, 2013

Copy link
Copy Markdown
Contributor Author

librustrt needs to link against jemalloc's dependencies (in this case, pthreads). I do not know how to accomplish this.

@brson

brson commented Jun 6, 2013

Copy link
Copy Markdown
Contributor

I still want to do a little testing on mac and in multithreaded scenarios. Sorry for the delay.

bors added a commit that referenced this pull request Jun 7, 2013
@bors bors closed this Jun 7, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Mar 25, 2021
replace span_lint with span_lint_and_sugg along with error message

fixes: rust-lang#6874
changelog: none

apologies if this may not be the most idiomatic way of doing it, any advice on changes (if any) would be greatly appreciated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants