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

Issue 9460015: Do not count invocations but usage of a function, i.e., increment a function's counter at IC calls … (Closed)

Created:
8 years, 10 months ago by srdjan
Modified:
8 years, 10 months ago
Reviewers:
regis
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Do not count invocations but usage of a function, i.e., increment a function's counter at IC calls and at return operations in unoptimized code. (TODO: increment count at static calls as well). There is no checking at method entry any more. The function counter reporting is not measuring the invocation count but much more how much time we spend in a method. Removed counter at backward branches. Renamed flags to: --optimization_counter_threshold (default 2000) --report_usage_count Committed: https://code.google.com/p/dart/source/detail?r=4583

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Total comments: 8

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -195 lines) Patch
M runtime/vm/code_generator.cc View 1 2 3 4 5 6 7 4 chunks +24 lines, -4 lines 0 comments Download
runtime/vm/code_generator_arm.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/vm/code_generator_ia32.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -2 lines 0 comments Download
M runtime/vm/code_generator_ia32.cc View 1 2 3 4 5 6 7 7 chunks +27 lines, -53 lines 0 comments Download
M runtime/vm/code_generator_x64.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -2 lines 0 comments Download
M runtime/vm/code_generator_x64.cc View 1 2 3 4 5 6 7 6 chunks +5 lines, -54 lines 0 comments Download
M runtime/vm/instructions_ia32_test.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/instructions_x64_test.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/isolate.cc View 1 2 3 4 5 6 7 5 chunks +10 lines, -10 lines 0 comments Download
M runtime/vm/object.h View 1 2 3 4 5 6 7 2 chunks +10 lines, -6 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/opt_code_generator_ia32.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M runtime/vm/raw_object.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/raw_object_snapshot.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/stub_code.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M runtime/vm/stub_code_arm.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -5 lines 0 comments Download
M runtime/vm/stub_code_ia32.cc View 1 2 3 4 5 6 7 3 chunks +20 lines, -22 lines 0 comments Download
M runtime/vm/stub_code_x64.cc View 1 2 3 4 5 6 7 2 chunks +1 line, -23 lines 0 comments Download
M tests/corelib/src/CollectionToStringTest.dart View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M tests/language/src/MathVMTest.dart View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
srdjan
8 years, 10 months ago (2012-02-24 21:58:19 UTC) #1
regis
LGTM https://chromiumcodereview.appspot.com/9460015/diff/1076/runtime/vm/code_generator.cc File runtime/vm/code_generator.cc (right): https://chromiumcodereview.appspot.com/9460015/diff/1076/runtime/vm/code_generator.cc#newcode31 runtime/vm/code_generator.cc:31: DECLARE_FLAG(int, optimization_counter_threshold); It should not be necessary to ...
8 years, 10 months ago (2012-02-24 23:56:25 UTC) #2
srdjan
8 years, 10 months ago (2012-02-25 00:22:10 UTC) #3
Thanks!

https://chromiumcodereview.appspot.com/9460015/diff/1076/runtime/vm/code_gene...
File runtime/vm/code_generator.cc (right):

https://chromiumcodereview.appspot.com/9460015/diff/1076/runtime/vm/code_gene...
runtime/vm/code_generator.cc:31: DECLARE_FLAG(int,
optimization_counter_threshold);
On 2012/02/24 23:56:25, regis wrote:
> It should not be necessary to declare a flag that was defined above.

Done.

https://chromiumcodereview.appspot.com/9460015/diff/1076/runtime/vm/code_gene...
File runtime/vm/code_generator_x64.cc (right):

https://chromiumcodereview.appspot.com/9460015/diff/1076/runtime/vm/code_gene...
runtime/vm/code_generator_x64.cc:277: // - type checks are enabled.
On 2012/02/24 23:56:25, regis wrote:
> In the 32-bit version you added a TODO here:
> // TODO(srdjan): Still needed?

Done.

https://chromiumcodereview.appspot.com/9460015/diff/1076/runtime/vm/isolate.cc
File runtime/vm/isolate.cc (right):

https://chromiumcodereview.appspot.com/9460015/diff/1076/runtime/vm/isolate.c...
runtime/vm/isolate.cc:255: static int MostCalledFunctionFirst(const Function*
const* a,
On 2012/02/24 23:56:25, regis wrote:
> Rename to MostUsedFunctionFirst?

Done.

https://chromiumcodereview.appspot.com/9460015/diff/1076/runtime/vm/stub_code...
File runtime/vm/stub_code_x64.cc (right):

https://chromiumcodereview.appspot.com/9460015/diff/1076/runtime/vm/stub_code...
runtime/vm/stub_code_x64.cc:1526: intptr_t num_args) {
On 2012/02/24 23:56:25, regis wrote:
> How about adding a TODO to check the usage counter and optimize the function
as
> in the 32-bit version?

Done.

Powered by Google App Engine
This is Rietveld 408576698