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

Issue 2363413004: VM: Avoid allocating strings when disassembling code. (Closed)

Created:
4 years, 2 months ago by Florian Schneider
Modified:
4 years, 2 months ago
Reviewers:
rmacnak
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

VM: Avoid allocating strings when disassembling code. For code objects, don't allocate symbol strings when printing the disassembly. Don't try to make disassembling work with background compilation -- instead make sure that we don't allocate on the Dart heap while disassembling. Add NoSafepointScope around disassemble functions to assert that no allocation happens. Also, remove some dead code from object.cc. BUG=#27430 R=rmacnak@google.com Committed: https://github.com/dart-lang/sdk/commit/4bd534191a2b011652ee208ad9e4225f5017e5a2

Patch Set 1 #

Patch Set 2 : fix VM service, add NoSafepointScope #

Patch Set 3 : fix printing of variable descriptors #

Total comments: 2

Patch Set 4 : addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -105 lines) Patch
M runtime/vm/compiler.cc View 1 1 chunk +0 lines, -4 lines 0 comments Download
M runtime/vm/disassembler.cc View 1 2 4 chunks +9 lines, -4 lines 0 comments Download
M runtime/vm/object.h View 1 3 chunks +3 lines, -7 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 8 chunks +28 lines, -55 lines 0 comments Download
M runtime/vm/object_service.cc View 1 2 14 chunks +26 lines, -25 lines 0 comments Download
M runtime/vm/object_test.cc View 1 2 chunks +3 lines, -4 lines 0 comments Download
M runtime/vm/profiler.h View 1 chunk +1 line, -2 lines 0 comments Download
M runtime/vm/profiler_service.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M tests/language/disassemble_test.dart View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (3 generated)
Florian Schneider
4 years, 2 months ago (2016-09-27 18:14:41 UTC) #3
rmacnak
lgtm https://codereview.chromium.org/2363413004/diff/40001/runtime/vm/object.cc File runtime/vm/object.cc (right): https://codereview.chromium.org/2363413004/diff/40001/runtime/vm/object.cc#newcode20485 runtime/vm/object.cc:20485: cstr[cstr_len - 1] = '\0'; I'd prefer using ...
4 years, 2 months ago (2016-09-27 19:21:12 UTC) #4
Florian Schneider
https://codereview.chromium.org/2363413004/diff/40001/runtime/vm/object.cc File runtime/vm/object.cc (right): https://codereview.chromium.org/2363413004/diff/40001/runtime/vm/object.cc#newcode20485 runtime/vm/object.cc:20485: cstr[cstr_len - 1] = '\0'; On 2016/09/27 19:21:12, rmacnak ...
4 years, 2 months ago (2016-09-27 19:35:06 UTC) #5
Florian Schneider
4 years, 2 months ago (2016-09-27 19:43:12 UTC) #7
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
4bd534191a2b011652ee208ad9e4225f5017e5a2 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698