You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Neil Conway <ne...@gmail.com> on 2015/10/19 06:20:56 UTC
Review Request 39429: Replaced volatile,
GCC intrinsics with std::atomic.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39429/
-----------------------------------------------------------
Review request for mesos and Joris Van Remoortere.
Bugs: MESOS-3326
https://issues.apache.org/jira/browse/MESOS-3326
Repository: mesos
Description
-------
See MESOS-3326. We adopted std::atomic in most of the code base earlier (commits
87de003c6e8a, 4b938052b6af, and 4a01850c5540), but a few places were omitted;
those locations are fixed by this commit.
There's one last place to fix: we use the GCC intrinsic __sync_synchronize() in
3rdparty/libprocess/include/process/logging.h. Because that is used to protect
modifications to the FLAGS_v variable defined by glog, we can't easily adapt it
to use std::atomic.
Diffs
-----
3rdparty/libprocess/include/process/owned.hpp bc5b527152c8864544ad58070c0bfc81639056da
3rdparty/libprocess/include/process/shared.hpp 021807b961bb55f11c9e04327135bd83f4d86c21
3rdparty/libprocess/src/tests/process_tests.cpp e5277de5b5bdea4a44606cda7fbf69a559aeebbe
Diff: https://reviews.apache.org/r/39429/diff/
Testing
-------
Thanks,
Neil Conway
Re: Review Request 39429: Replaced volatile,
GCC intrinsics with std::atomic.
Posted by Neil Conway <ne...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39429/
-----------------------------------------------------------
(Updated Oct. 20, 2015, 8:18 p.m.)
Review request for mesos and Joris Van Remoortere.
Bugs: MESOS-3326
https://issues.apache.org/jira/browse/MESOS-3326
Repository: mesos
Description
-------
See MESOS-3326. We adopted std::atomic in most of the code base earlier (commits
87de003c6e8a, 4b938052b6af, and 4a01850c5540), but a few places were omitted;
those locations are fixed by this commit.
There's one last place to fix: we use the GCC intrinsic __sync_synchronize() in
3rdparty/libprocess/include/process/logging.h. Because that is used to protect
modifications to the FLAGS_v variable defined by glog, we can't easily adapt it
to use std::atomic.
Diffs (updated)
-----
3rdparty/libprocess/include/process/owned.hpp 17c42614155fed8fec185f29f9a9babb71ff5f85
3rdparty/libprocess/include/process/shared.hpp 021807b961bb55f11c9e04327135bd83f4d86c21
3rdparty/libprocess/src/tests/process_tests.cpp a3c57a261c09f7b76b78225719e64a26f2d66cd3
Diff: https://reviews.apache.org/r/39429/diff/
Testing
-------
Thanks,
Neil Conway
Re: Review Request 39429: Replaced volatile,
GCC intrinsics with std::atomic.
Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39429/#review103106
-----------------------------------------------------------
Patch looks great!
Reviews applied: [39428, 39429]
All tests passed.
- Mesos ReviewBot
On Oct. 19, 2015, 4:48 a.m., Neil Conway wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39429/
> -----------------------------------------------------------
>
> (Updated Oct. 19, 2015, 4:48 a.m.)
>
>
> Review request for mesos and Joris Van Remoortere.
>
>
> Bugs: MESOS-3326
> https://issues.apache.org/jira/browse/MESOS-3326
>
>
> Repository: mesos
>
>
> Description
> -------
>
> See MESOS-3326. We adopted std::atomic in most of the code base earlier (commits
> 87de003c6e8a, 4b938052b6af, and 4a01850c5540), but a few places were omitted;
> those locations are fixed by this commit.
>
> There's one last place to fix: we use the GCC intrinsic __sync_synchronize() in
> 3rdparty/libprocess/include/process/logging.h. Because that is used to protect
> modifications to the FLAGS_v variable defined by glog, we can't easily adapt it
> to use std::atomic.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/include/process/owned.hpp 17c42614155fed8fec185f29f9a9babb71ff5f85
> 3rdparty/libprocess/include/process/shared.hpp 021807b961bb55f11c9e04327135bd83f4d86c21
> 3rdparty/libprocess/src/tests/process_tests.cpp a3c57a261c09f7b76b78225719e64a26f2d66cd3
>
> Diff: https://reviews.apache.org/r/39429/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Neil Conway
>
>
Re: Review Request 39429: Replaced volatile,
GCC intrinsics with std::atomic.
Posted by Neil Conway <ne...@gmail.com>.
> On Oct. 20, 2015, 7 p.m., Joris Van Remoortere wrote:
> > 3rdparty/libprocess/include/process/owned.hpp, lines 202-203
> > <https://reviews.apache.org/r/39429/diff/2/?file=1100746#file1100746line202>
> >
> > In libprocess we use `snake_case`.
> > You can also consider removing the temporary. I'm fine either way as it serves as documentation. If you keep the temporary can you make it `const`? :-D
Woah, I had no idea we use snake_case in libprocess. I think we should add this to the style guide. Also I notice a few places (mostly test code, plus src/time.cpp) that don't use snake_case. Is it worth fixing these?
- Neil
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39429/#review103292
-----------------------------------------------------------
On Oct. 20, 2015, 8:18 p.m., Neil Conway wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39429/
> -----------------------------------------------------------
>
> (Updated Oct. 20, 2015, 8:18 p.m.)
>
>
> Review request for mesos and Joris Van Remoortere.
>
>
> Bugs: MESOS-3326
> https://issues.apache.org/jira/browse/MESOS-3326
>
>
> Repository: mesos
>
>
> Description
> -------
>
> See MESOS-3326. We adopted std::atomic in most of the code base earlier (commits
> 87de003c6e8a, 4b938052b6af, and 4a01850c5540), but a few places were omitted;
> those locations are fixed by this commit.
>
> There's one last place to fix: we use the GCC intrinsic __sync_synchronize() in
> 3rdparty/libprocess/include/process/logging.h. Because that is used to protect
> modifications to the FLAGS_v variable defined by glog, we can't easily adapt it
> to use std::atomic.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/include/process/owned.hpp 17c42614155fed8fec185f29f9a9babb71ff5f85
> 3rdparty/libprocess/include/process/shared.hpp 021807b961bb55f11c9e04327135bd83f4d86c21
> 3rdparty/libprocess/src/tests/process_tests.cpp a3c57a261c09f7b76b78225719e64a26f2d66cd3
>
> Diff: https://reviews.apache.org/r/39429/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Neil Conway
>
>
Re: Review Request 39429: Replaced volatile,
GCC intrinsics with std::atomic.
Posted by Joris Van Remoortere <jo...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39429/#review103292
-----------------------------------------------------------
Ship it!
3rdparty/libprocess/include/process/owned.hpp (lines 202 - 203)
<https://reviews.apache.org/r/39429/#comment161278>
In libprocess we use `snake_case`.
You can also consider removing the temporary. I'm fine either way as it serves as documentation. If you keep the temporary can you make it `const`? :-D
3rdparty/libprocess/include/process/shared.hpp (lines 171 - 172)
<https://reviews.apache.org/r/39429/#comment161279>
`snake_case` for libprocess.
- Joris Van Remoortere
On Oct. 19, 2015, 4:48 a.m., Neil Conway wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39429/
> -----------------------------------------------------------
>
> (Updated Oct. 19, 2015, 4:48 a.m.)
>
>
> Review request for mesos and Joris Van Remoortere.
>
>
> Bugs: MESOS-3326
> https://issues.apache.org/jira/browse/MESOS-3326
>
>
> Repository: mesos
>
>
> Description
> -------
>
> See MESOS-3326. We adopted std::atomic in most of the code base earlier (commits
> 87de003c6e8a, 4b938052b6af, and 4a01850c5540), but a few places were omitted;
> those locations are fixed by this commit.
>
> There's one last place to fix: we use the GCC intrinsic __sync_synchronize() in
> 3rdparty/libprocess/include/process/logging.h. Because that is used to protect
> modifications to the FLAGS_v variable defined by glog, we can't easily adapt it
> to use std::atomic.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/include/process/owned.hpp 17c42614155fed8fec185f29f9a9babb71ff5f85
> 3rdparty/libprocess/include/process/shared.hpp 021807b961bb55f11c9e04327135bd83f4d86c21
> 3rdparty/libprocess/src/tests/process_tests.cpp a3c57a261c09f7b76b78225719e64a26f2d66cd3
>
> Diff: https://reviews.apache.org/r/39429/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Neil Conway
>
>
Re: Review Request 39429: Replaced volatile,
GCC intrinsics with std::atomic.
Posted by Neil Conway <ne...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39429/
-----------------------------------------------------------
(Updated Oct. 19, 2015, 4:48 a.m.)
Review request for mesos and Joris Van Remoortere.
Bugs: MESOS-3326
https://issues.apache.org/jira/browse/MESOS-3326
Repository: mesos
Description
-------
See MESOS-3326. We adopted std::atomic in most of the code base earlier (commits
87de003c6e8a, 4b938052b6af, and 4a01850c5540), but a few places were omitted;
those locations are fixed by this commit.
There's one last place to fix: we use the GCC intrinsic __sync_synchronize() in
3rdparty/libprocess/include/process/logging.h. Because that is used to protect
modifications to the FLAGS_v variable defined by glog, we can't easily adapt it
to use std::atomic.
Diffs (updated)
-----
3rdparty/libprocess/include/process/owned.hpp 17c42614155fed8fec185f29f9a9babb71ff5f85
3rdparty/libprocess/include/process/shared.hpp 021807b961bb55f11c9e04327135bd83f4d86c21
3rdparty/libprocess/src/tests/process_tests.cpp a3c57a261c09f7b76b78225719e64a26f2d66cd3
Diff: https://reviews.apache.org/r/39429/diff/
Testing
-------
Thanks,
Neil Conway
Re: Review Request 39429: Replaced volatile,
GCC intrinsics with std::atomic.
Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39429/#review103095
-----------------------------------------------------------
Bad patch!
Reviews applied: [39428, 39429]
Failed command: ./support/apply-review.sh -n -r 39429
Error:
2015-10-19 04:39:57 URL:https://reviews.apache.org/r/39429/diff/raw/ [9602/9602] -> "39429.patch" [1]
error: patch failed: 3rdparty/libprocess/src/tests/process_tests.cpp:21
error: 3rdparty/libprocess/src/tests/process_tests.cpp: patch does not apply
Failed to apply patch
- Mesos ReviewBot
On Oct. 19, 2015, 4:20 a.m., Neil Conway wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39429/
> -----------------------------------------------------------
>
> (Updated Oct. 19, 2015, 4:20 a.m.)
>
>
> Review request for mesos and Joris Van Remoortere.
>
>
> Bugs: MESOS-3326
> https://issues.apache.org/jira/browse/MESOS-3326
>
>
> Repository: mesos
>
>
> Description
> -------
>
> See MESOS-3326. We adopted std::atomic in most of the code base earlier (commits
> 87de003c6e8a, 4b938052b6af, and 4a01850c5540), but a few places were omitted;
> those locations are fixed by this commit.
>
> There's one last place to fix: we use the GCC intrinsic __sync_synchronize() in
> 3rdparty/libprocess/include/process/logging.h. Because that is used to protect
> modifications to the FLAGS_v variable defined by glog, we can't easily adapt it
> to use std::atomic.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/include/process/owned.hpp bc5b527152c8864544ad58070c0bfc81639056da
> 3rdparty/libprocess/include/process/shared.hpp 021807b961bb55f11c9e04327135bd83f4d86c21
> 3rdparty/libprocess/src/tests/process_tests.cpp e5277de5b5bdea4a44606cda7fbf69a559aeebbe
>
> Diff: https://reviews.apache.org/r/39429/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Neil Conway
>
>