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

Side by Side Diff: runtime/vm/profiler_service.cc

Issue 1389353004: Remove isolate argument from handle allocation: Part II (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: c Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/report.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/profiler_service.h" 5 #include "vm/profiler_service.h"
6 6
7 #include "vm/growable_array.h" 7 #include "vm/growable_array.h"
8 #include "vm/native_symbol.h" 8 #include "vm/native_symbol.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/os.h" 10 #include "vm/os.h"
(...skipping 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after
1838 pc, 1838 pc,
1839 pc + 1, 1839 pc + 1,
1840 0, 1840 0,
1841 null_code_); 1841 null_code_);
1842 return code; 1842 return code;
1843 } 1843 }
1844 1844
1845 ProfileCode* CreateProfileCode(uword pc) { 1845 ProfileCode* CreateProfileCode(uword pc) {
1846 const intptr_t kDartCodeAlignment = OS::PreferredCodeAlignment(); 1846 const intptr_t kDartCodeAlignment = OS::PreferredCodeAlignment();
1847 const intptr_t kDartCodeAlignmentMask = ~(kDartCodeAlignment - 1); 1847 const intptr_t kDartCodeAlignmentMask = ~(kDartCodeAlignment - 1);
1848 Code& code = Code::Handle(isolate_); 1848 Code& code = Code::Handle(isolate_->current_zone());
1849 1849
1850 // Check current isolate for pc. 1850 // Check current isolate for pc.
1851 if (isolate_->heap()->CodeContains(pc)) { 1851 if (isolate_->heap()->CodeContains(pc)) {
1852 code ^= Code::LookupCode(pc); 1852 code ^= Code::LookupCode(pc);
1853 if (!code.IsNull()) { 1853 if (!code.IsNull()) {
1854 deoptimized_code_->Add(code); 1854 deoptimized_code_->Add(code);
1855 return new ProfileCode(ProfileCode::kDartCode, 1855 return new ProfileCode(ProfileCode::kDartCode,
1856 code.EntryPoint(), 1856 code.EntryPoint(),
1857 code.EntryPoint() + code.Size(), 1857 code.EntryPoint() + code.Size(),
1858 code.compile_timestamp(), 1858 code.compile_timestamp(),
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
2290 ASSERT(sample_buffer != NULL); 2290 ASSERT(sample_buffer != NULL);
2291 2291
2292 ClearProfileVisitor clear_profile(isolate); 2292 ClearProfileVisitor clear_profile(isolate);
2293 sample_buffer->VisitSamples(&clear_profile); 2293 sample_buffer->VisitSamples(&clear_profile);
2294 2294
2295 // Enable profile interrupts. 2295 // Enable profile interrupts.
2296 Profiler::BeginExecution(isolate); 2296 Profiler::BeginExecution(isolate);
2297 } 2297 }
2298 2298
2299 } // namespace dart 2299 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/report.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698