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

Side by Side Diff: src/api.cc

Issue 24566004: Add an API for additional profile log records (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 2 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 6296 matching lines...) Expand 10 before | Expand all | Expand 10 after
6307 intptr_t V8::AdjustAmountOfExternalAllocatedMemory(intptr_t change_in_bytes) { 6307 intptr_t V8::AdjustAmountOfExternalAllocatedMemory(intptr_t change_in_bytes) {
6308 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); 6308 i::Isolate* isolate = i::Isolate::UncheckedCurrent();
6309 if (isolate == NULL || !isolate->IsInitialized()) { 6309 if (isolate == NULL || !isolate->IsInitialized()) {
6310 return 0; 6310 return 0;
6311 } 6311 }
6312 Isolate* isolate_ext = reinterpret_cast<Isolate*>(isolate); 6312 Isolate* isolate_ext = reinterpret_cast<Isolate*>(isolate);
6313 return isolate_ext->AdjustAmountOfExternalAllocatedMemory(change_in_bytes); 6313 return isolate_ext->AdjustAmountOfExternalAllocatedMemory(change_in_bytes);
6314 } 6314 }
6315 6315
6316 6316
6317 void V8::AddProfilerMark(char* mark) {
6318 i::Isolate* isolate = i::Isolate::Current();
6319 LOG(isolate, MarkEvent(mark));
6320 }
6321
6322
6317 HeapProfiler* Isolate::GetHeapProfiler() { 6323 HeapProfiler* Isolate::GetHeapProfiler() {
6318 i::HeapProfiler* heap_profiler = 6324 i::HeapProfiler* heap_profiler =
6319 reinterpret_cast<i::Isolate*>(this)->heap_profiler(); 6325 reinterpret_cast<i::Isolate*>(this)->heap_profiler();
6320 return reinterpret_cast<HeapProfiler*>(heap_profiler); 6326 return reinterpret_cast<HeapProfiler*>(heap_profiler);
6321 } 6327 }
6322 6328
6323 6329
6324 CpuProfiler* Isolate::GetCpuProfiler() { 6330 CpuProfiler* Isolate::GetCpuProfiler() {
6325 i::CpuProfiler* cpu_profiler = 6331 i::CpuProfiler* cpu_profiler =
6326 reinterpret_cast<i::Isolate*>(this)->cpu_profiler(); 6332 reinterpret_cast<i::Isolate*>(this)->cpu_profiler();
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after
7544 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7550 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7545 Address callback_address = 7551 Address callback_address =
7546 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7552 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7547 VMState<EXTERNAL> state(isolate); 7553 VMState<EXTERNAL> state(isolate);
7548 ExternalCallbackScope call_scope(isolate, callback_address); 7554 ExternalCallbackScope call_scope(isolate, callback_address);
7549 callback(info); 7555 callback(info);
7550 } 7556 }
7551 7557
7552 7558
7553 } } // namespace v8::internal 7559 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698