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

Side by Side Diff: src/api.cc

Issue 2813673002: Reland of Ensure counters are initialized, to avoid init on non-joinable threads. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | src/counters.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 8566 matching lines...) Expand 10 before | Expand all | Expand 10 after
8577 isolate->InitializeLoggingAndCounters(); 8577 isolate->InitializeLoggingAndCounters();
8578 isolate->counters()->ResetCounters(); 8578 isolate->counters()->ResetCounters();
8579 } 8579 }
8580 8580
8581 8581
8582 void Isolate::SetCreateHistogramFunction(CreateHistogramCallback callback) { 8582 void Isolate::SetCreateHistogramFunction(CreateHistogramCallback callback) {
8583 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 8583 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8584 isolate->stats_table()->SetCreateHistogramFunction(callback); 8584 isolate->stats_table()->SetCreateHistogramFunction(callback);
8585 isolate->InitializeLoggingAndCounters(); 8585 isolate->InitializeLoggingAndCounters();
8586 isolate->counters()->ResetHistograms(); 8586 isolate->counters()->ResetHistograms();
8587 isolate->counters()->InitializeHistograms();
8587 } 8588 }
8588 8589
8589 8590
8590 void Isolate::SetAddHistogramSampleFunction( 8591 void Isolate::SetAddHistogramSampleFunction(
8591 AddHistogramSampleCallback callback) { 8592 AddHistogramSampleCallback callback) {
8592 reinterpret_cast<i::Isolate*>(this) 8593 reinterpret_cast<i::Isolate*>(this)
8593 ->stats_table() 8594 ->stats_table()
8594 ->SetAddHistogramSampleFunction(callback); 8595 ->SetAddHistogramSampleFunction(callback);
8595 } 8596 }
8596 8597
(...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after
10316 Address callback_address = 10317 Address callback_address =
10317 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 10318 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
10318 VMState<EXTERNAL> state(isolate); 10319 VMState<EXTERNAL> state(isolate);
10319 ExternalCallbackScope call_scope(isolate, callback_address); 10320 ExternalCallbackScope call_scope(isolate, callback_address);
10320 callback(info); 10321 callback(info);
10321 } 10322 }
10322 10323
10323 10324
10324 } // namespace internal 10325 } // namespace internal
10325 } // namespace v8 10326 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698