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

Side by Side Diff: src/heap.cc

Issue 26166004: Get rid of HEAP_PROFILE macro (Closed) Base URL: https://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
« no previous file with comments | « src/builtins.cc ('k') | src/heap-profiler.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 // 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 2112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2123 int size)) { 2123 int size)) {
2124 // Copy the content of source to target. 2124 // Copy the content of source to target.
2125 heap->CopyBlock(target->address(), source->address(), size); 2125 heap->CopyBlock(target->address(), source->address(), size);
2126 2126
2127 // Set the forwarding address. 2127 // Set the forwarding address.
2128 source->set_map_word(MapWord::FromForwardingAddress(target)); 2128 source->set_map_word(MapWord::FromForwardingAddress(target));
2129 2129
2130 if (logging_and_profiling_mode == LOGGING_AND_PROFILING_ENABLED) { 2130 if (logging_and_profiling_mode == LOGGING_AND_PROFILING_ENABLED) {
2131 // Update NewSpace stats if necessary. 2131 // Update NewSpace stats if necessary.
2132 RecordCopiedObject(heap, target); 2132 RecordCopiedObject(heap, target);
2133 HEAP_PROFILE(heap,
2134 ObjectMoveEvent(source->address(), target->address(), size));
2135 Isolate* isolate = heap->isolate(); 2133 Isolate* isolate = heap->isolate();
2134 HeapProfiler* heap_profiler = isolate->heap_profiler();
2135 if (heap_profiler->is_profiling()) {
2136 heap_profiler->ObjectMoveEvent(source->address(), target->address(),
2137 size);
2138 }
2136 if (isolate->logger()->is_logging_code_events() || 2139 if (isolate->logger()->is_logging_code_events() ||
2137 isolate->cpu_profiler()->is_profiling()) { 2140 isolate->cpu_profiler()->is_profiling()) {
2138 if (target->IsSharedFunctionInfo()) { 2141 if (target->IsSharedFunctionInfo()) {
2139 PROFILE(isolate, SharedFunctionInfoMoveEvent( 2142 PROFILE(isolate, SharedFunctionInfoMoveEvent(
2140 source->address(), target->address())); 2143 source->address(), target->address()));
2141 } 2144 }
2142 } 2145 }
2143 } 2146 }
2144 2147
2145 if (marks_handling == TRANSFER_MARKS) { 2148 if (marks_handling == TRANSFER_MARKS) {
(...skipping 5854 matching lines...) Expand 10 before | Expand all | Expand 10 after
8000 if (FLAG_concurrent_recompilation) { 8003 if (FLAG_concurrent_recompilation) {
8001 heap_->relocation_mutex_->Lock(); 8004 heap_->relocation_mutex_->Lock();
8002 #ifdef DEBUG 8005 #ifdef DEBUG
8003 heap_->relocation_mutex_locked_by_optimizer_thread_ = 8006 heap_->relocation_mutex_locked_by_optimizer_thread_ =
8004 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); 8007 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread();
8005 #endif // DEBUG 8008 #endif // DEBUG
8006 } 8009 }
8007 } 8010 }
8008 8011
8009 } } // namespace v8::internal 8012 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/heap-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698