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

Unified Diff: src/vm-state-inl.h

Issue 1707563002: Split the TRACE_EVENTs from the LOG/HistogramTimers/TimerEvents functionality. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-compiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/vm-state-inl.h
diff --git a/src/vm-state-inl.h b/src/vm-state-inl.h
index d60548d27d131126b0f2c38c34a9a2c8da668104..7c9fdb1f978c3455c43d26b7faa780cc79aba8c9 100644
--- a/src/vm-state-inl.h
+++ b/src/vm-state-inl.h
@@ -8,6 +8,7 @@
#include "src/vm-state.h"
#include "src/log.h"
#include "src/simulator.h"
+#include "src/tracing/trace-event.h"
namespace v8 {
namespace internal {
@@ -39,8 +40,11 @@ inline const char* StateToString(StateTag state) {
template <StateTag Tag>
VMState<Tag>::VMState(Isolate* isolate)
: isolate_(isolate), previous_tag_(isolate->current_vm_state()) {
- if (FLAG_log_timer_events && previous_tag_ != EXTERNAL && Tag == EXTERNAL) {
- LOG(isolate_, TimerEvent(Logger::START, TimerEventExternal::name()));
+ if (previous_tag_ != EXTERNAL && Tag == EXTERNAL) {
+ if (FLAG_log_timer_events) {
+ LOG(isolate_, TimerEvent(Logger::START, TimerEventExternal::name()));
+ }
+ TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("v8"), "V8.External");
}
isolate_->set_current_vm_state(Tag);
}
@@ -48,8 +52,11 @@ VMState<Tag>::VMState(Isolate* isolate)
template <StateTag Tag>
VMState<Tag>::~VMState() {
- if (FLAG_log_timer_events && previous_tag_ != EXTERNAL && Tag == EXTERNAL) {
- LOG(isolate_, TimerEvent(Logger::END, TimerEventExternal::name()));
+ if (previous_tag_ != EXTERNAL && Tag == EXTERNAL) {
+ if (FLAG_log_timer_events) {
+ LOG(isolate_, TimerEvent(Logger::END, TimerEventExternal::name()));
+ }
+ TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("v8"), "V8.External");
}
isolate_->set_current_vm_state(previous_tag_);
}
« no previous file with comments | « src/runtime/runtime-compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698