OLD | NEW |
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 Loading... |
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(); | |
8588 } | 8587 } |
8589 | 8588 |
8590 | 8589 |
8591 void Isolate::SetAddHistogramSampleFunction( | 8590 void Isolate::SetAddHistogramSampleFunction( |
8592 AddHistogramSampleCallback callback) { | 8591 AddHistogramSampleCallback callback) { |
8593 reinterpret_cast<i::Isolate*>(this) | 8592 reinterpret_cast<i::Isolate*>(this) |
8594 ->stats_table() | 8593 ->stats_table() |
8595 ->SetAddHistogramSampleFunction(callback); | 8594 ->SetAddHistogramSampleFunction(callback); |
8596 } | 8595 } |
8597 | 8596 |
(...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10317 Address callback_address = | 10316 Address callback_address = |
10318 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 10317 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
10319 VMState<EXTERNAL> state(isolate); | 10318 VMState<EXTERNAL> state(isolate); |
10320 ExternalCallbackScope call_scope(isolate, callback_address); | 10319 ExternalCallbackScope call_scope(isolate, callback_address); |
10321 callback(info); | 10320 callback(info); |
10322 } | 10321 } |
10323 | 10322 |
10324 | 10323 |
10325 } // namespace internal | 10324 } // namespace internal |
10326 } // namespace v8 | 10325 } // namespace v8 |
OLD | NEW |