Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Issue 2822943002: [dart:io] Adds ProcessInfo.{max,current}Rss. Adds OS::MaxRSS on Fuchsia. (Closed)

Created:
3 years, 8 months ago by zra
Modified:
3 years, 8 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

[dart:io] Adds ProcessInfo.{max,current}Rss. Adds OS::MaxRSS on Fuchsia. R=rmacnak@google.com Committed: https://github.com/dart-lang/sdk/commit/9ce608e89d6b68d84f529fd9dab18f2bc61f5a8e

Patch Set 1 #

Patch Set 2 : Implement on other platforms, etc. #

Patch Set 3 : Fix Linux, etc. #

Patch Set 4 : Cleanup #

Total comments: 2

Patch Set 5 : Fix Windows include #

Patch Set 6 : Address comments #

Patch Set 7 : Fix Windows build #

Patch Set 8 : Fix Android build #

Patch Set 9 : Fix build #

Patch Set 10 : Fix Fuchsia build #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+280 lines, -3 lines) Patch
M pkg/dev_compiler/tool/input_sdk/patch/io_patch.dart View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
M runtime/bin/io_natives.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/bin/process.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/bin/process.cc View 1 2 3 4 5 1 chunk +20 lines, -0 lines 0 comments Download
M runtime/bin/process_android.cc View 1 2 3 4 5 6 7 2 chunks +36 lines, -0 lines 0 comments Download
M runtime/bin/process_fuchsia.cc View 1 2 3 4 5 6 7 8 9 1 chunk +21 lines, -0 lines 0 comments Download
M runtime/bin/process_linux.cc View 1 2 3 4 5 6 7 8 2 chunks +37 lines, -0 lines 0 comments Download
M runtime/bin/process_macos.cc View 1 2 3 4 5 2 chunks +25 lines, -0 lines 0 comments Download
M runtime/bin/process_patch.dart View 1 2 1 chunk +24 lines, -0 lines 4 comments Download
M runtime/bin/process_unsupported.cc View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M runtime/bin/process_win.cc View 1 2 3 4 5 6 2 chunks +19 lines, -0 lines 0 comments Download
M runtime/vm/kernel.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/os_fuchsia.cc View 1 2 3 4 5 6 7 2 chunks +7 lines, -2 lines 0 comments Download
M sdk/lib/_internal/js_runtime/lib/io_patch.dart View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
M sdk/lib/io/process.dart View 1 2 3 1 chunk +27 lines, -0 lines 0 comments Download
A tests/standalone/io/process_info_test.dart View 1 2 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (5 generated)
zra
3 years, 8 months ago (2017-04-17 18:20:22 UTC) #3
rmacnak
lgtm https://codereview.chromium.org/2822943002/diff/60001/runtime/bin/process.h File runtime/bin/process.h (right): https://codereview.chromium.org/2822943002/diff/60001/runtime/bin/process.h#newcode149 runtime/bin/process.h:149: static intptr_t CurrentRSS(); Consider uintptr_t or int64_t. A ...
3 years, 8 months ago (2017-04-17 20:09:02 UTC) #4
zra
https://codereview.chromium.org/2822943002/diff/60001/runtime/bin/process.h File runtime/bin/process.h (right): https://codereview.chromium.org/2822943002/diff/60001/runtime/bin/process.h#newcode149 runtime/bin/process.h:149: static intptr_t CurrentRSS(); On 2017/04/17 20:09:02, rmacnak wrote: > ...
3 years, 8 months ago (2017-04-17 21:19:00 UTC) #5
zra
Committed patchset #10 (id:170001) manually as 9ce608e89d6b68d84f529fd9dab18f2bc61f5a8e (presubmit successful).
3 years, 8 months ago (2017-04-17 21:41:47 UTC) #7
kevmoo
DBQ: Changelog update?
3 years, 8 months ago (2017-04-17 22:47:42 UTC) #9
Vyacheslav Egorov (Google)
DBC https://codereview.chromium.org/2822943002/diff/170001/runtime/bin/process_patch.dart File runtime/bin/process_patch.dart (right): https://codereview.chromium.org/2822943002/diff/170001/runtime/bin/process_patch.dart#newcode172 runtime/bin/process_patch.dart:172: var result = _maxRss(); This code looks bizarre ...
3 years, 8 months ago (2017-04-18 16:02:04 UTC) #11
zra
https://codereview.chromium.org/2822943002/diff/170001/runtime/bin/process_patch.dart File runtime/bin/process_patch.dart (right): https://codereview.chromium.org/2822943002/diff/170001/runtime/bin/process_patch.dart#newcode172 runtime/bin/process_patch.dart:172: var result = _maxRss(); On 2017/04/18 16:02:04, Vyacheslav Egorov ...
3 years, 8 months ago (2017-04-18 16:07:18 UTC) #12
Vyacheslav Egorov (Google)
https://codereview.chromium.org/2822943002/diff/170001/runtime/bin/process_patch.dart File runtime/bin/process_patch.dart (right): https://codereview.chromium.org/2822943002/diff/170001/runtime/bin/process_patch.dart#newcode172 runtime/bin/process_patch.dart:172: var result = _maxRss(); longjmp and setjmp are dangerous ...
3 years, 8 months ago (2017-04-18 16:21:17 UTC) #13
zra
3 years, 8 months ago (2017-04-18 16:33:58 UTC) #14
Message was sent while issue was closed.
https://codereview.chromium.org/2822943002/diff/170001/runtime/bin/process_pa...
File runtime/bin/process_patch.dart (right):

https://codereview.chromium.org/2822943002/diff/170001/runtime/bin/process_pa...
runtime/bin/process_patch.dart:172: var result = _maxRss();
On 2017/04/18 16:21:17, Vyacheslav Egorov (Google) wrote:
> longjmp and setjmp are dangerous indeed[*] - nevertheless the whole VM is
built
> on top of them and we can hardly avoid using them. Also both of these are APIs
> that we provide to external Dart VM users and extension writers - if we avoid
> using them, what does it say about our API quality? 
> 
> We should either fix these APIs or avoid them entirely, right now we have a
> mixture of styles(**) which is very bad sign:  
> 
> $ egrep -e "PropagateError|ThrowException" runtime/bin/process.cc | wc -l
> 20
> 
> (*) if only there was a mechanism that seamlessly integrated with C++
exceptions
> and ensured correct destruction of all locally constructed objects when
> unwinding the stack... ah, wait, there is such a mechanism.
> 
> (**) and style with returning Error is extremely confusing. You spent 30 lines
> of code writing something that fits into 4 self-documenting lines!
> 
> @patch
> class ProcessInfo {
>   @patch
>   static int get maxRss native "ProcessInfo_MaxRSS";
>   @patch
>   static int get currentRss native "ProcessInfo_CurrentRSS";
> }
> 

Slava, you make some valid points, but:
1. I don't appreciate your snarky tone.
2. If you don't have resources from your team to devote to code-health in
dart:io, then this discussion won't be productive.

Powered by Google App Engine
This is Rietveld 408576698