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

Side by Side Diff: src/api.cc

Issue 318063002: Do not overwrite event logger when we explicitly have --log-timer-events. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 | « no previous file | no next file » | 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 #include "src/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 6631 matching lines...) Expand 10 before | Expand all | Expand 10 after
6642 heap_statistics->total_heap_size_ = heap->CommittedMemory(); 6642 heap_statistics->total_heap_size_ = heap->CommittedMemory();
6643 heap_statistics->total_heap_size_executable_ = 6643 heap_statistics->total_heap_size_executable_ =
6644 heap->CommittedMemoryExecutable(); 6644 heap->CommittedMemoryExecutable();
6645 heap_statistics->total_physical_size_ = heap->CommittedPhysicalMemory(); 6645 heap_statistics->total_physical_size_ = heap->CommittedPhysicalMemory();
6646 heap_statistics->used_heap_size_ = heap->SizeOfObjects(); 6646 heap_statistics->used_heap_size_ = heap->SizeOfObjects();
6647 heap_statistics->heap_size_limit_ = heap->MaxReserved(); 6647 heap_statistics->heap_size_limit_ = heap->MaxReserved();
6648 } 6648 }
6649 6649
6650 6650
6651 void Isolate::SetEventLogger(LogEventCallback that) { 6651 void Isolate::SetEventLogger(LogEventCallback that) {
6652 // Do not overwrite the event logger if we want to log explicitly.
6653 if (i::FLAG_log_timer_events) return;
6652 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 6654 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
6653 isolate->set_event_logger(that); 6655 isolate->set_event_logger(that);
6654 } 6656 }
6655 6657
6656 6658
6657 void Isolate::AddCallCompletedCallback(CallCompletedCallback callback) { 6659 void Isolate::AddCallCompletedCallback(CallCompletedCallback callback) {
6658 if (callback == NULL) return; 6660 if (callback == NULL) return;
6659 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 6661 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
6660 isolate->AddCallCompletedCallback(callback); 6662 isolate->AddCallCompletedCallback(callback);
6661 } 6663 }
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
7592 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7594 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7593 Address callback_address = 7595 Address callback_address =
7594 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7596 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7595 VMState<EXTERNAL> state(isolate); 7597 VMState<EXTERNAL> state(isolate);
7596 ExternalCallbackScope call_scope(isolate, callback_address); 7598 ExternalCallbackScope call_scope(isolate, callback_address);
7597 callback(info); 7599 callback(info);
7598 } 7600 }
7599 7601
7600 7602
7601 } } // namespace v8::internal 7603 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698