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

Side by Side Diff: src/log.cc

Issue 186163002: Add support for allowing an embedder to get the V8 profile timer event logs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove check for an existing event_logger, as at this point, none might have already been set Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/log.h ('k') | test/cctest/test-api.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 } 1117 }
1118 1118
1119 1119
1120 void Logger::LeaveExternal(Isolate* isolate) { 1120 void Logger::LeaveExternal(Isolate* isolate) {
1121 LOG(isolate, TimerEvent(END, TimerEventScope::v8_external)); 1121 LOG(isolate, TimerEvent(END, TimerEventScope::v8_external));
1122 ASSERT(isolate->current_vm_state() == EXTERNAL); 1122 ASSERT(isolate->current_vm_state() == EXTERNAL);
1123 isolate->set_current_vm_state(JS); 1123 isolate->set_current_vm_state(JS);
1124 } 1124 }
1125 1125
1126 1126
1127 void Logger::LogInternalEvents(const char* name, int se) {
1128 Isolate* isolate = Isolate::Current();
1129 LOG(isolate, TimerEvent(static_cast<StartEnd>(se), name));
1130 }
1131
1132
1127 void Logger::TimerEventScope::LogTimerEvent(StartEnd se) { 1133 void Logger::TimerEventScope::LogTimerEvent(StartEnd se) {
1128 LOG(isolate_, TimerEvent(se, name_)); 1134 isolate_->event_logger()(name_, se);
1129 } 1135 }
1130 1136
1131 1137
1132 const char* Logger::TimerEventScope::v8_recompile_synchronous = 1138 const char* Logger::TimerEventScope::v8_recompile_synchronous =
1133 "V8.RecompileSynchronous"; 1139 "V8.RecompileSynchronous";
1134 const char* Logger::TimerEventScope::v8_recompile_concurrent = 1140 const char* Logger::TimerEventScope::v8_recompile_concurrent =
1135 "V8.RecompileConcurrent"; 1141 "V8.RecompileConcurrent";
1136 const char* Logger::TimerEventScope::v8_compile_full_code = 1142 const char* Logger::TimerEventScope::v8_compile_full_code =
1137 "V8.CompileFullCode"; 1143 "V8.CompileFullCode";
1138 const char* Logger::TimerEventScope::v8_execute = "V8.Execute"; 1144 const char* Logger::TimerEventScope::v8_execute = "V8.Execute";
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
2153 if (jit_logger_) { 2159 if (jit_logger_) {
2154 removeCodeEventListener(jit_logger_); 2160 removeCodeEventListener(jit_logger_);
2155 delete jit_logger_; 2161 delete jit_logger_;
2156 jit_logger_ = NULL; 2162 jit_logger_ = NULL;
2157 } 2163 }
2158 2164
2159 return log_->Close(); 2165 return log_->Close();
2160 } 2166 }
2161 2167
2162 } } // namespace v8::internal 2168 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/log.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698