Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make dump_{alloc,allocs,local}() no-ops when tracing is disabled. #50246

Merged
merged 1 commit into from
Apr 27, 2018

Conversation

nnethercote
Copy link
Contributor

Because they traverse data structures and build up strings, which is
wasted effort if those strings aren't printed.

The patch also removes some now-unnecessary log_enabled! tests at call
sites.

This is a big win for the Debug and Opt runs of coercions, tuple-stress, html5ever, and encoding.

coercions-opt
        avg: -7.8%      min: -14.8%     max: 0.1%
coercions
        avg: -8.0%      min: -12.8%     max: 0.1%
tuple-stress
        avg: -7.2%      min: -10.8%     max: -0.7%
tuple-stress-opt
        avg: -6.9%      min: -10.7%     max: 0.6%
html5ever
        avg: -4.6%      min: -7.3%      max: -0.3%
encoding
        avg: -2.4%      min: -4.5%      max: 0.1%
html5ever-opt
        avg: -2.7%      min: -4.2%      max: -0.2%
encoding-opt
        avg: -1.4%      min: -2.4%      max: 0.0%

Because they traverse data structures and build up strings, which is
wasted effort if those strings aren't printed.

The patch also removes some now-unnecessary log_enabled! tests at call
sites.
@rust-highfive
Copy link
Collaborator

r? @cramertj

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 26, 2018
@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Apr 26, 2018

📌 Commit 2e4f66a has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 26, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Apr 27, 2018
…Simulacrum

Make dump_{alloc,allocs,local}() no-ops when tracing is disabled.

Because they traverse data structures and build up strings, which is
wasted effort if those strings aren't printed.

The patch also removes some now-unnecessary log_enabled! tests at call
sites.

This is a big win for the Debug and Opt runs of coercions, tuple-stress, html5ever, and encoding.
```
coercions-opt
        avg: -7.8%      min: -14.8%     max: 0.1%
coercions
        avg: -8.0%      min: -12.8%     max: 0.1%
tuple-stress
        avg: -7.2%      min: -10.8%     max: -0.7%
tuple-stress-opt
        avg: -6.9%      min: -10.7%     max: 0.6%
html5ever
        avg: -4.6%      min: -7.3%      max: -0.3%
encoding
        avg: -2.4%      min: -4.5%      max: 0.1%
html5ever-opt
        avg: -2.7%      min: -4.2%      max: -0.2%
encoding-opt
        avg: -1.4%      min: -2.4%      max: 0.0%
```
bors added a commit that referenced this pull request Apr 27, 2018
Rollup of 7 pull requests

Successful merges:

 - #49707 (Add "the Rustc book")
 - #50222 (Bump bootstrap compiler to 2018-04-24)
 - #50227 (Fix ICE with erroneous `impl Trait` in a trait impl)
 - #50229 (Add setting to go to item if there is only one result)
 - #50231 (Add more doc aliases)
 - #50246 (Make dump_{alloc,allocs,local}() no-ops when tracing is disabled.)
 - #49894 (Rename InternedString to LocalInternedString and introduce a new thread-safe InternedString)

Failed merges:
@eddyb
Copy link
Member

eddyb commented Apr 27, 2018

cc @oli-obk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants