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

Move spin_loop_hint to core::hint module #56996

Merged
merged 1 commit into from
Jan 18, 2019

Conversation

clarfonthey
Copy link
Contributor

As mentioned in #55002. The new name is kept unstable to decide whether the function should have _hint in its name.

@rust-highfive
Copy link
Collaborator

r? @KodrAus

(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 Dec 19, 2018
@rust-highfive

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:0a1fbb34:start=1545276305527646940,finish=1545276389072489264,duration=83544842324
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
    100% |████████████████████████████████| 51kB 10.6MB/s 
Collecting botocore==1.12.69 (from awscli)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/72/ba/a188505f67a78a686aa24d8511a18cb5a8bb27705c9d1b1bb81bee97a138/botocore-1.12.69-py2.py3-none-any.whl (5.2MB)
    0% |                                | 10kB 39.7MB/s eta 0:00:01
    0% |▏                               | 20kB 39.0MB/s eta 0:00:01
    0% |▏                               | 30kB 43.4MB/s eta 0:00:01
    0% |▎                               | 40kB 38.4MB/s eta 0:00:01
---
187088 ./obj/build/cache/2018-12-09
160388 ./obj/build/bootstrap/debug/incremental
153280 ./src/tools/clang
144288 ./obj/build/bootstrap/debug/incremental/bootstrap-2x7szixskz2uj
144284 ./obj/build/bootstrap/debug/incremental/bootstrap-2x7szixskz2uj/s-f7r67yu4ze-rpr10o-3g9jcdhvsk79m
111164 ./obj/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends
107420 ./src/tools/lldb
95108 ./src/tools/clang/test
89968 ./src/llvm-emscripten/test/CodeGen
---
travis_time:end:23d82a0a:start=1545276692104189928,finish=1545276692109010868,duration=4820940
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:066e9370
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:01349e5c
travis_time:start:01349e5c
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:38b46aa8:start=1545854025139190070,finish=1545854026128466485,duration=989276415
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
187088 ./obj/build/cache/2018-12-09
160388 ./obj/build/bootstrap/debug/incremental
153288 ./src/tools/clang
144288 ./obj/build/bootstrap/debug/incremental/bootstrap-2x7szixskz2uj
144284 ./obj/build/bootstrap/debug/incremental/bootstrap-2x7szixskz2uj/s-f7yjl29yi9-esuwm7-2o68jogcg2xpo
111164 ./obj/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends
107416 ./src/tools/lldb
95116 ./src/tools/clang/test
90408 ./.git

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@KodrAus
Copy link
Contributor

KodrAus commented Jan 1, 2019

sad trombone

@bors retry

@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 Jan 1, 2019
@clarfonthey
Copy link
Contributor Author

I honestly don't know how to fix the error here. I was under the impression that you could set the stability of an export differently from the original, but that might have changed.

@kennytm kennytm added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 3, 2019
@bors
Copy link
Contributor

bors commented Jan 9, 2019

☔ The latest upstream changes (presumably #56407) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:09ed7d20:start=1547001746166781524,finish=1547001748289823824,duration=2123042300
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:05:49]    Compiling jobserver v0.1.12
[00:05:49]    Compiling memmap v0.6.2
[00:05:50]    Compiling rand v0.6.1
[00:05:50]    Compiling parking_lot_core v0.3.0
[00:05:50] error[E0658]: use of unstable library feature 'renamed_spin_loop' (see issue #55002)
[00:05:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot_core-0.3.0/src/spinwait.rs:10:5
[00:05:50] 10 | use std::sync::atomic::spin_loop_hint;
[00:05:50]    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[00:05:50]    |
[00:05:50]    = help: add #![feature(renamed_spin_loop)] to the crate attributes to enable
[00:05:50]    = help: add #![feature(renamed_spin_loop)] to the crate attributes to enable
[00:05:50] 
[00:05:50] error[E0658]: use of unstable library feature 'renamed_spin_loop' (see issue #55002)
[00:05:50]   --> /cargo/registry/src/github.com-1ecc6299db9ec823/parking_lot_core-0.3.0/src/spinwait.rs:61:9
[00:05:50] 61 |         spin_loop_hint()
[00:05:50]    |         ^^^^^^^^^^^^^^
[00:05:50]    |
[00:05:50]    = help: add #![feature(renamed_spin_loop)] to the crate attributes to enable

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@KodrAus
Copy link
Contributor

KodrAus commented Jan 9, 2019

It's a bit unfortunate.

How about we punt on the feature gate, decide in #55002 whether the name should be core::hint::spin_loop or core::hint::spin_loop_hint (throwing my hat in with core::hint::spin_loop), and go from there?

asm!("yield" ::: "memory" : "volatile");
}
}
pub use hint::spin_loop as spin_loop_hint;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to deprecate this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because if the other name is unstable, then you can't actually use the replacement.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah of course :) I'd already put myself in the mindset that this would be stable.

@clarfonthey
Copy link
Contributor Author

Do you think that it would be worthwhile simply doing an FCP here to name the replacement spin_loop? Not really sure how we can initiate conversation on this short of starting an FCP.

I can update the PR to make the renamed version instantly stable and deprecate the old one, if that's desired.

@KodrAus
Copy link
Contributor

KodrAus commented Jan 9, 2019

Do you think that it would be worthwhile simply doing an FCP here to name the replacement spin_loop?

Sure, let's do that 👍 @rfcbot doesn't actually like me though so I'll just give the libs team a ping.

cc @rust-lang/libs what do you think about deprecating core::sync::atomic::spin_loop_hint in favour of core::hint::spin_loop?

If we don't want the insta-stable core::hint::spin_loop function then we might just have to do some more shimming shenanigans to make the core::sync::atomic::spin_loop_hint function internally call core::hint::spin_loop.

@clarfonthey
Copy link
Contributor Author

That's a good idea-- I'll update the PR to do that regardless and we can decide whether to insta-stabilise or not.

@alexcrichton
Copy link
Member

I think it's fine to deprecate the one in atomic, and we'd want to schedule its deprecation to at least 2 releases after the stabilization of this new function (and possibly 3-4 releases)

@clarfonthey clarfonthey force-pushed the spin_loop_hint branch 5 times, most recently from dfc1289 to 10696c6 Compare January 10, 2019 14:03
@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jan 15, 2019
@kennytm kennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 15, 2019
@kennytm
Copy link
Member

kennytm commented Jan 15, 2019

@bors retry

@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 Jan 15, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:06c5070f:start=1547544036668993722,finish=1547544110427254251,duration=73758260529
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
travis_time:start:test_debuginfo
Check compiletest suite=debuginfo mode=debuginfo-both (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:12:14] 
[01:12:14] running 118 tests
[01:12:39] .iiiii...i.....i..i...i..i.i..i.ii..i.....i..i....i..........iiii..........i...ii...i.......ii.i.i.i 100/118
[01:12:44] ......iii.i.....ii
[01:12:44] 
[01:12:44]  finished in 29.867
[01:12:44] travis_fold:end:test_debuginfo

---
[01:39:52] travis_fold:end:stage0-linkchecker

[01:39:52] travis_time:end:stage0-linkchecker:start=1547550110119868230,finish=1547550112081692327,duration=1961824097

[01:39:56] std/hint/fn.spin_loop.html:3: broken link - /checkout/obj/build/x86_64-unknown-linux-gnu/std/thread/fn.yield_now.html
[01:39:59] core/hint/fn.spin_loop.html:3: broken link - /checkout/obj/build/x86_64-unknown-linux-gnu/std/thread/fn.yield_now.html
[01:40:00] thread 'main' panicked at 'found some broken links', src/tools/linkchecker/main.rs:39:9
[01:40:00] 
[01:40:00] 
[01:40:00] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/linkchecker" "/checkout/obj/build/x86_64-unknown-linux-gnu/doc"
[01:40:00] expected success, got: exit code: 101
[01:40:00] expected success, got: exit code: 101
[01:40:00] 
[01:40:00] 
[01:40:00] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:40:00] Build completed unsuccessfully in 0:39:22
[01:40:00] make: *** [check] Error 1
[01:40:00] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:08ffd828
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Tue Jan 15 11:02:00 UTC 2019
---
travis_time:end:0c504482:start=1547550121979173460,finish=1547550121984730642,duration=5557182
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:02d2d84c
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!chetravis_time:end:02d2d84c:start=1547550121989581918,finish=1547550122049724122,duration=60142204
travis_fold:start:after_failure.5
travis_time:start:10859e80
travis_time:start:10859e80
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:13fd3388
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@clarfonthey
Copy link
Contributor Author

clarfonthey commented Jan 15, 2019

Fixed broken link; should be ready to merge now. Also if someone could add the appropriate tags to the tracking issue I'd appreciate it.

@kennytm kennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 15, 2019
@KodrAus
Copy link
Contributor

KodrAus commented Jan 16, 2019

@bors r+

Thanks @clarcharr! I'll update the tracking issue.

@bors
Copy link
Contributor

bors commented Jan 16, 2019

📌 Commit 24ca530 has been approved by KodrAus

@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 Jan 16, 2019
Centril added a commit to Centril/rust that referenced this pull request Jan 17, 2019
Move spin_loop_hint to core::hint module

As mentioned in rust-lang#55002. The new name is kept unstable to decide whether the function should have `_hint` in its name.
Centril added a commit to Centril/rust that referenced this pull request Jan 17, 2019
Move spin_loop_hint to core::hint module

As mentioned in rust-lang#55002. The new name is kept unstable to decide whether the function should have `_hint` in its name.
Centril added a commit to Centril/rust that referenced this pull request Jan 17, 2019
Move spin_loop_hint to core::hint module

As mentioned in rust-lang#55002. The new name is kept unstable to decide whether the function should have `_hint` in its name.
@bors
Copy link
Contributor

bors commented Jan 18, 2019

⌛ Testing commit 24ca530 with merge 38650b6...

bors added a commit that referenced this pull request Jan 18, 2019
Move spin_loop_hint to core::hint module

As mentioned in #55002. The new name is kept unstable to decide whether the function should have `_hint` in its name.
@bors
Copy link
Contributor

bors commented Jan 18, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: KodrAus
Pushing 38650b6 to master...

@bors bors merged commit 24ca530 into rust-lang:master Jan 18, 2019
@clarfonthey clarfonthey deleted the spin_loop_hint branch January 31, 2019 05:46
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