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

Side by Side Diff: src/vm-state-inl.h

Issue 11280212: Introduce --log-external-callbacks flag apart from --log-timer-events. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/x64/macro-assembler-x64.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 62
63 VMState::VMState(Isolate* isolate, StateTag tag) 63 VMState::VMState(Isolate* isolate, StateTag tag)
64 : isolate_(isolate), previous_tag_(isolate->current_vm_state()) { 64 : isolate_(isolate), previous_tag_(isolate->current_vm_state()) {
65 if (FLAG_log_state_changes) { 65 if (FLAG_log_state_changes) {
66 LOG(isolate, UncheckedStringEvent("Entering", StateToString(tag))); 66 LOG(isolate, UncheckedStringEvent("Entering", StateToString(tag)));
67 LOG(isolate, UncheckedStringEvent("From", StateToString(previous_tag_))); 67 LOG(isolate, UncheckedStringEvent("From", StateToString(previous_tag_)));
68 } 68 }
69 69
70 if (FLAG_log_timer_events) { 70 if (FLAG_log_external_callbacks) {
71 LOG(isolate, ExternalSwitch(previous_tag_, tag)); 71 LOG(isolate, ExternalSwitch(previous_tag_, tag));
72 } 72 }
73 73
74 isolate_->SetCurrentVMState(tag); 74 isolate_->SetCurrentVMState(tag);
75 } 75 }
76 76
77 77
78 VMState::~VMState() { 78 VMState::~VMState() {
79 if (FLAG_log_state_changes) { 79 if (FLAG_log_state_changes) {
80 LOG(isolate_, 80 LOG(isolate_,
81 UncheckedStringEvent("Leaving", 81 UncheckedStringEvent("Leaving",
82 StateToString(isolate_->current_vm_state()))); 82 StateToString(isolate_->current_vm_state())));
83 LOG(isolate_, 83 LOG(isolate_,
84 UncheckedStringEvent("To", StateToString(previous_tag_))); 84 UncheckedStringEvent("To", StateToString(previous_tag_)));
85 } 85 }
86 86
87 if (FLAG_log_timer_events) { 87 if (FLAG_log_external_callbacks) {
88 LOG(isolate_, ExternalSwitch(isolate_->current_vm_state(), previous_tag_)); 88 LOG(isolate_, ExternalSwitch(isolate_->current_vm_state(), previous_tag_));
89 } 89 }
90 90
91 isolate_->SetCurrentVMState(previous_tag_); 91 isolate_->SetCurrentVMState(previous_tag_);
92 } 92 }
93 93
94 94
95 ExternalCallbackScope::ExternalCallbackScope(Isolate* isolate, Address callback) 95 ExternalCallbackScope::ExternalCallbackScope(Isolate* isolate, Address callback)
96 : isolate_(isolate), previous_callback_(isolate->external_callback()) { 96 : isolate_(isolate), previous_callback_(isolate->external_callback()) {
97 isolate_->set_external_callback(callback); 97 isolate_->set_external_callback(callback);
98 } 98 }
99 99
100 ExternalCallbackScope::~ExternalCallbackScope() { 100 ExternalCallbackScope::~ExternalCallbackScope() {
101 isolate_->set_external_callback(previous_callback_); 101 isolate_->set_external_callback(previous_callback_);
102 } 102 }
103 103
104 104
105 } } // namespace v8::internal 105 } } // namespace v8::internal
106 106
107 #endif // V8_VM_STATE_INL_H_ 107 #endif // V8_VM_STATE_INL_H_
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698