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

Side by Side Diff: src/log.cc

Issue 2188193002: [api] Remove HistogramTimerScope from high-frequency API-Functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: make TimerEventScope inlineable Created 4 years, 4 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 | « src/log.h ('k') | src/log-inl.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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/log.h" 5 #include "src/log.h"
6 6
7 #include <cstdarg> 7 #include <cstdarg>
8 #include <memory> 8 #include <memory>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 isolate->set_current_vm_state(EXTERNAL); 888 isolate->set_current_vm_state(EXTERNAL);
889 } 889 }
890 890
891 891
892 void Logger::LeaveExternal(Isolate* isolate) { 892 void Logger::LeaveExternal(Isolate* isolate) {
893 LOG(isolate, TimerEvent(END, TimerEventExternal::name())); 893 LOG(isolate, TimerEvent(END, TimerEventExternal::name()));
894 DCHECK(isolate->current_vm_state() == EXTERNAL); 894 DCHECK(isolate->current_vm_state() == EXTERNAL);
895 isolate->set_current_vm_state(JS); 895 isolate->set_current_vm_state(JS);
896 } 896 }
897 897
898
899 template <class TimerEvent>
900 void TimerEventScope<TimerEvent>::LogTimerEvent(Logger::StartEnd se) {
901 Logger::CallEventLogger(isolate_, TimerEvent::name(), se,
902 TimerEvent::expose_to_api());
903 }
904
905
906 // Instantiate template methods. 898 // Instantiate template methods.
907 #define V(TimerName, expose) \ 899 #define V(TimerName, expose) \
908 template void TimerEventScope<TimerEvent##TimerName>::LogTimerEvent( \ 900 template void TimerEventScope<TimerEvent##TimerName>::LogTimerEvent( \
909 Logger::StartEnd se); 901 Logger::StartEnd se);
910 TIMER_EVENTS_LIST(V) 902 TIMER_EVENTS_LIST(V)
911 #undef V 903 #undef V
912 904
913 905
914 namespace { 906 namespace {
915 // Emits the source code of a regexp. Used by regexp events. 907 // Emits the source code of a regexp. Used by regexp events.
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
1870 1862
1871 if (profiler_listener_.get() != nullptr) { 1863 if (profiler_listener_.get() != nullptr) {
1872 removeCodeEventListener(profiler_listener_.get()); 1864 removeCodeEventListener(profiler_listener_.get());
1873 } 1865 }
1874 1866
1875 return log_->Close(); 1867 return log_->Close();
1876 } 1868 }
1877 1869
1878 } // namespace internal 1870 } // namespace internal
1879 } // namespace v8 1871 } // namespace v8
OLDNEW
« no previous file with comments | « src/log.h ('k') | src/log-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698