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

Side by Side Diff: src/d8.cc

Issue 1771323003: [counter] reducing the overhead of RuntimeCallTimerScope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: further reducing overhead Created 4 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
« no previous file with comments | « src/counters.cc ('k') | src/vm-state-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 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 5
6 // Defined when linking against shared lib on Windows. 6 // Defined when linking against shared lib on Windows.
7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED)
8 #define V8_SHARED 8 #define V8_SHARED
9 #endif 9 #endif
10 10
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 1313
1314 1314
1315 inline bool operator<(const CounterAndKey& lhs, const CounterAndKey& rhs) { 1315 inline bool operator<(const CounterAndKey& lhs, const CounterAndKey& rhs) {
1316 return strcmp(lhs.key, rhs.key) < 0; 1316 return strcmp(lhs.key, rhs.key) < 0;
1317 } 1317 }
1318 #endif // !V8_SHARED 1318 #endif // !V8_SHARED
1319 1319
1320 1320
1321 void Shell::OnExit(v8::Isolate* isolate) { 1321 void Shell::OnExit(v8::Isolate* isolate) {
1322 #ifndef V8_SHARED 1322 #ifndef V8_SHARED
1323 reinterpret_cast<i::Isolate*>(isolate)->DumpAndResetCompilationStats();
1324 if (i::FLAG_dump_counters) { 1323 if (i::FLAG_dump_counters) {
1325 int number_of_counters = 0; 1324 int number_of_counters = 0;
1326 for (CounterMap::Iterator i(counter_map_); i.More(); i.Next()) { 1325 for (CounterMap::Iterator i(counter_map_); i.More(); i.Next()) {
1327 number_of_counters++; 1326 number_of_counters++;
1328 } 1327 }
1329 CounterAndKey* counters = new CounterAndKey[number_of_counters]; 1328 CounterAndKey* counters = new CounterAndKey[number_of_counters];
1330 int j = 0; 1329 int j = 0;
1331 for (CounterMap::Iterator i(counter_map_); i.More(); i.Next(), j++) { 1330 for (CounterMap::Iterator i(counter_map_); i.More(); i.Next(), j++) {
1332 counters[j].counter = i.CurrentValue(); 1331 counters[j].counter = i.CurrentValue();
1333 counters[j].key = i.CurrentKey(); 1332 counters[j].key = i.CurrentKey();
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2554 } 2553 }
2555 2554
2556 } // namespace v8 2555 } // namespace v8
2557 2556
2558 2557
2559 #ifndef GOOGLE3 2558 #ifndef GOOGLE3
2560 int main(int argc, char* argv[]) { 2559 int main(int argc, char* argv[]) {
2561 return v8::Shell::Main(argc, argv); 2560 return v8::Shell::Main(argc, argv);
2562 } 2561 }
2563 #endif 2562 #endif
OLDNEW
« no previous file with comments | « src/counters.cc ('k') | src/vm-state-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698