mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:28:02 +00:00
Fix bad inclusive ticks for functions on release x64
BUG= Review URL: https://codereview.chromium.org//1264523002 .
This commit is contained in:
parent
902da6eeef
commit
b2bdbfdc1e
2 changed files with 6 additions and 3 deletions
|
@ -97,7 +97,8 @@ ProfileFunction::ProfileFunction(Kind kind,
|
|||
table_index_(table_index),
|
||||
profile_codes_(0),
|
||||
exclusive_ticks_(0),
|
||||
inclusive_ticks_(0) {
|
||||
inclusive_ticks_(0),
|
||||
inclusive_serial_(-1) {
|
||||
ASSERT((kind_ != kDartFunction) || !function_.IsNull());
|
||||
ASSERT((kind_ != kDartFunction) || (table_index_ >= 0));
|
||||
ASSERT(profile_codes_.length() == 0);
|
||||
|
@ -1224,6 +1225,7 @@ class ProfileBuilder : public ValueObject {
|
|||
void BuildInclusiveFunctionTrie(ProfileFunctionTrieNode* root) {
|
||||
ScopeTimer sw("ProfileBuilder::BuildInclusiveFunctionTrie",
|
||||
FLAG_trace_profiler);
|
||||
ASSERT(!tick_functions_);
|
||||
for (intptr_t sample_index = 0;
|
||||
sample_index < samples_->length();
|
||||
sample_index++) {
|
||||
|
@ -1254,6 +1256,7 @@ class ProfileBuilder : public ValueObject {
|
|||
void BuildExclusiveFunctionTrie(ProfileFunctionTrieNode* root) {
|
||||
ScopeTimer sw("ProfileBuilder::BuildExclusiveFunctionTrie",
|
||||
FLAG_trace_profiler);
|
||||
ASSERT(tick_functions_);
|
||||
for (intptr_t sample_index = 0;
|
||||
sample_index < samples_->length();
|
||||
sample_index++) {
|
||||
|
|
|
@ -369,7 +369,7 @@ TEST_CASE(Profiler_CodeTicks) {
|
|||
Profile profile(isolate);
|
||||
AllocationFilter filter(isolate, class_a.id());
|
||||
profile.Build(&filter, Profile::kNoTags);
|
||||
// We should have one allocation sample.
|
||||
// We should have three allocation samples.
|
||||
EXPECT_EQ(3, profile.sample_count());
|
||||
ProfileTrieWalker walker(&profile);
|
||||
|
||||
|
@ -461,7 +461,7 @@ TEST_CASE(Profiler_FunctionTicks) {
|
|||
Profile profile(isolate);
|
||||
AllocationFilter filter(isolate, class_a.id());
|
||||
profile.Build(&filter, Profile::kNoTags);
|
||||
// We should have one allocation sample.
|
||||
// We should have three allocation samples.
|
||||
EXPECT_EQ(3, profile.sample_count());
|
||||
ProfileTrieWalker walker(&profile);
|
||||
|
||||
|
|
Loading…
Reference in a new issue