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

Don't arena-allocate static symbols. #61077

Merged
merged 1 commit into from May 26, 2019

Conversation

Projects
None yet
4 participants
@nnethercote
Copy link
Contributor

commented May 23, 2019

It's just a waste of memory. This also gets rid of the special case for
"".

r? @petrochenkov

@petrochenkov

This comment has been minimized.

Copy link
Contributor

commented May 23, 2019

Haha, nice idea.

Minimized even further:

    fn prefill(init: &[&'static str]) -> Self {
        Interner {
            strings: init.into(),
            names: init.iter().copied().zip((0..).map(Symbol::new)).collect(),
            ..Default::default()
        }
    }
@nnethercote

This comment has been minimized.

Copy link
Contributor Author

commented May 23, 2019

Today I learned that collect works with HashMap :)

@nnethercote nnethercote force-pushed the nnethercote:tweak-prefill branch from c3bf807 to c4f48b3 May 24, 2019

@nnethercote

This comment has been minimized.

Copy link
Contributor Author

commented May 24, 2019

@petrochenkov: I have updated the code.

@petrochenkov

This comment has been minimized.

Copy link
Contributor

commented May 24, 2019

Looks like the changes were not pushed to github.

Don't arena-allocate static symbols.
It's just a waste of memory. This also gets rid of the special case for
"".

@nnethercote nnethercote force-pushed the nnethercote:tweak-prefill branch from c4f48b3 to e396f99 May 24, 2019

@nnethercote

This comment has been minimized.

Copy link
Contributor Author

commented May 24, 2019

Ok, changes are pushed now! Sorry about that.

@petrochenkov

This comment has been minimized.

Copy link
Contributor

commented May 24, 2019

Thanks!
@bors r+ rollup

@bors

This comment has been minimized.

Copy link
Contributor

commented May 24, 2019

📌 Commit e396f99 has been approved by petrochenkov

Centril added a commit to Centril/rust that referenced this pull request May 24, 2019

Rollup merge of rust-lang#61077 - nnethercote:tweak-prefill, r=petroc…
…henkov

Don't arena-allocate static symbols.

It's just a waste of memory. This also gets rid of the special case for
"".

r? @petrochenkov

bors added a commit that referenced this pull request May 24, 2019

Auto merge of #61127 - Centril:rollup-4xipbkf, r=Centril
Rollup of 13 pull requests

Successful merges:

 - #61077 (Don't arena-allocate static symbols.)
 - #61094 (Make find_local iterate instead of recurse)
 - #61095 (Update cargo)
 - #61096 (tidy: don't short-circuit on license error)
 - #61103 (Make find iterate instead of recurse)
 - #61104 (Make eval_place_to_op iterate instead of recurse)
 - #61107 (Fix a couple docs typos)
 - #61111 (Fixed type-alias-bounds lint doc)
 - #61113 (Deprecate `FnBox`. `Box<dyn FnOnce()>` can be called directly, since 1.35)
 - #61116 (Remove the incorrect warning from README.md)
 - #61118 (Dont ICE on an attempt to use GAT without feature gate)
 - #61120 (Make eval_place iterate instead of recurse)
 - #61125 (Updated my mailmap entry)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request May 24, 2019

Rollup merge of rust-lang#61077 - nnethercote:tweak-prefill, r=petroc…
…henkov

Don't arena-allocate static symbols.

It's just a waste of memory. This also gets rid of the special case for
"".

r? @petrochenkov

bors added a commit that referenced this pull request May 24, 2019

Auto merge of #61128 - Centril:rollup-rwjauqz, r=Centril
Rollup of 13 pull requests

Successful merges:

 - #61077 (Don't arena-allocate static symbols.)
 - #61094 (Make find_local iterate instead of recurse)
 - #61095 (Update cargo)
 - #61096 (tidy: don't short-circuit on license error)
 - #61103 (Make find iterate instead of recurse)
 - #61104 (Make eval_place_to_op iterate instead of recurse)
 - #61107 (Fix a couple docs typos)
 - #61110 (Revert edition-guide toolstate override)
 - #61111 (Fixed type-alias-bounds lint doc)
 - #61113 (Deprecate `FnBox`. `Box<dyn FnOnce()>` can be called directly, since 1.35)
 - #61116 (Remove the incorrect warning from README.md)
 - #61118 (Dont ICE on an attempt to use GAT without feature gate)
 - #61125 (Updated my mailmap entry)

Failed merges:

r? @ghost

bors added a commit that referenced this pull request May 24, 2019

Auto merge of #61128 - Centril:rollup-rwjauqz, r=Centril
Rollup of 13 pull requests

Successful merges:

 - #61077 (Don't arena-allocate static symbols.)
 - #61094 (Make find_local iterate instead of recurse)
 - #61095 (Update cargo)
 - #61096 (tidy: don't short-circuit on license error)
 - #61103 (Make find iterate instead of recurse)
 - #61104 (Make eval_place_to_op iterate instead of recurse)
 - #61107 (Fix a couple docs typos)
 - #61110 (Revert edition-guide toolstate override)
 - #61111 (Fixed type-alias-bounds lint doc)
 - #61113 (Deprecate `FnBox`. `Box<dyn FnOnce()>` can be called directly, since 1.35)
 - #61116 (Remove the incorrect warning from README.md)
 - #61118 (Dont ICE on an attempt to use GAT without feature gate)
 - #61125 (Updated my mailmap entry)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request May 24, 2019

Rollup merge of rust-lang#61077 - nnethercote:tweak-prefill, r=petroc…
…henkov

Don't arena-allocate static symbols.

It's just a waste of memory. This also gets rid of the special case for
"".

r? @petrochenkov

bors added a commit that referenced this pull request May 24, 2019

Auto merge of #61131 - Centril:rollup-nb733r3, r=Centril
Rollup of 16 pull requests

Successful merges:

 - #61077 (Don't arena-allocate static symbols.)
 - #61092 (Make sanitize_place iterate instead of recurse)
 - #61094 (Make find_local iterate instead of recurse)
 - #61095 (Update cargo)
 - #61096 (tidy: don't short-circuit on license error)
 - #61099 (Make ignore_borrow iterate instead of recurse)
 - #61103 (Make find iterate instead of recurse)
 - #61107 (Fix a couple docs typos)
 - #61110 (Revert edition-guide toolstate override)
 - #61111 (Fixed type-alias-bounds lint doc)
 - #61113 (Deprecate `FnBox`. `Box<dyn FnOnce()>` can be called directly, since 1.35)
 - #61116 (Remove the incorrect warning from README.md)
 - #61118 (Dont ICE on an attempt to use GAT without feature gate)
 - #61120 (Make eval_place iterate instead of recurse)
 - #61121 (improve debug-printing of scalars)
 - #61125 (Updated my mailmap entry)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request May 25, 2019

Rollup merge of rust-lang#61077 - nnethercote:tweak-prefill, r=petroc…
…henkov

Don't arena-allocate static symbols.

It's just a waste of memory. This also gets rid of the special case for
"".

r? @petrochenkov

Centril added a commit to Centril/rust that referenced this pull request May 25, 2019

Rollup merge of rust-lang#61153 - Centril:rollup-b9qpiez, r=Centril
Rollup of 5 pull requests

Successful merges:

 - rust-lang#60928 (Changes the type `mir::Mir` into `mir::Body`)
 - rust-lang#61035 (Avoid more symbol interning)
 - rust-lang#61036 (PGO - Add a smoketest for combining PGO with cross-language LTO.)
 - rust-lang#61077 (Don't arena-allocate static symbols.)
 - rust-lang#61080 (Ship profiler with windows-gnu)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request May 25, 2019

Rollup merge of rust-lang#61077 - nnethercote:tweak-prefill, r=petroc…
…henkov

Don't arena-allocate static symbols.

It's just a waste of memory. This also gets rid of the special case for
"".

r? @petrochenkov

Centril added a commit to Centril/rust that referenced this pull request May 25, 2019

Rollup merge of rust-lang#61077 - nnethercote:tweak-prefill, r=petroc…
…henkov

Don't arena-allocate static symbols.

It's just a waste of memory. This also gets rid of the special case for
"".

r? @petrochenkov

bors added a commit that referenced this pull request May 25, 2019

Auto merge of #61171 - Centril:rollup-8lkypo8, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #61036 (PGO - Add a smoketest for combining PGO with cross-language LTO.)
 - #61077 (Don't arena-allocate static symbols.)
 - #61080 (Ship profiler with windows-gnu)
 - #61149 (Fix spelling in release notes)
 - #61161 (MaybeUninit doctest: remove unnecessary type ascription)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request May 25, 2019

Rollup merge of rust-lang#61077 - nnethercote:tweak-prefill, r=petroc…
…henkov

Don't arena-allocate static symbols.

It's just a waste of memory. This also gets rid of the special case for
"".

r? @petrochenkov

Centril added a commit to Centril/rust that referenced this pull request May 25, 2019

Rollup merge of rust-lang#61077 - nnethercote:tweak-prefill, r=petroc…
…henkov

Don't arena-allocate static symbols.

It's just a waste of memory. This also gets rid of the special case for
"".

r? @petrochenkov

bors added a commit that referenced this pull request May 25, 2019

Auto merge of #61178 - Centril:rollup-fis8hkk, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #60928 (Changes the type `mir::Mir` into `mir::Body`)
 - #61036 (PGO - Add a smoketest for combining PGO with cross-language LTO.)
 - #61077 (Don't arena-allocate static symbols.)
 - #61080 (Ship profiler with windows-gnu)
 - #61149 (Fix spelling in release notes)
 - #61161 (MaybeUninit doctest: remove unnecessary type ascription)
 - #61173 (Auto-derive Encode and Decode implementations of DefPathTable)

Failed merges:

r? @ghost

bors added a commit that referenced this pull request May 25, 2019

Auto merge of #61178 - Centril:rollup-fis8hkk, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #60928 (Changes the type `mir::Mir` into `mir::Body`)
 - #61036 (PGO - Add a smoketest for combining PGO with cross-language LTO.)
 - #61077 (Don't arena-allocate static symbols.)
 - #61080 (Ship profiler with windows-gnu)
 - #61149 (Fix spelling in release notes)
 - #61161 (MaybeUninit doctest: remove unnecessary type ascription)
 - #61173 (Auto-derive Encode and Decode implementations of DefPathTable)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request May 26, 2019

Rollup merge of rust-lang#61077 - nnethercote:tweak-prefill, r=petroc…
…henkov

Don't arena-allocate static symbols.

It's just a waste of memory. This also gets rid of the special case for
"".

r? @petrochenkov

bors added a commit that referenced this pull request May 26, 2019

Auto merge of #61210 - Centril:rollup-ofr6h5b, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #61077 (Don't arena-allocate static symbols.)
 - #61102 (Move path for iterate)
 - #61120 (Make eval_place iterate instead of recurse)
 - #61205 (docs: fix typo #61197)

Failed merges:

r? @ghost

@bors bors merged commit e396f99 into rust-lang:master May 26, 2019

1 check passed

Travis CI - Pull Request Build Passed
Details

@nnethercote nnethercote deleted the nnethercote:tweak-prefill branch May 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.