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

Side by Side Diff: src/heap-profiler.cc

Issue 40153003: AllocationProfiler: Inital version of RecordObjectAllocation for hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: mips, ia32 and arm platforms were added Created 7 years, 1 month 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/heap-profiler.h ('k') | src/hydrogen.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 2009-2010 the V8 project authors. All rights reserved. 1 // Copyright 2009-2010 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 164 }
165 165
166 166
167 void HeapProfiler::StopHeapAllocationsRecording() { 167 void HeapProfiler::StopHeapAllocationsRecording() {
168 StopHeapObjectsTracking(); 168 StopHeapObjectsTracking();
169 is_tracking_allocations_ = false; 169 is_tracking_allocations_ = false;
170 DropCompiledCode(); 170 DropCompiledCode();
171 } 171 }
172 172
173 173
174 void HeapProfiler::RecordObjectAllocationFromMasm(Isolate* isolate, 174 RUNTIME_FUNCTION(MaybeObject*, HeapProfiler_RecordObjectAllocation) {
175 Address obj, 175 ASSERT(args.length() == 2);
176 int size) { 176 Address address = reinterpret_cast<Address>(
177 isolate->heap_profiler()->NewObjectEvent(obj, size); 177 reinterpret_cast<intptr_t>(args[0]) & ~kHeapObjectTagMask);
178 int size = args.at<Smi>(1)->value();
179 isolate->heap_profiler()->NewObjectEvent(address, size);
180 return isolate->heap()->undefined_value();
178 } 181 }
179 182
180 183
181 void HeapProfiler::DropCompiledCode() { 184 void HeapProfiler::DropCompiledCode() {
182 Isolate* isolate = heap()->isolate(); 185 Isolate* isolate = heap()->isolate();
183 HandleScope scope(isolate); 186 HandleScope scope(isolate);
184 187
185 if (FLAG_concurrent_recompilation) { 188 if (FLAG_concurrent_recompilation) {
186 isolate->optimizing_compiler_thread()->Flush(); 189 isolate->optimizing_compiler_thread()->Flush();
187 } 190 }
(...skipping 22 matching lines...) Expand all
210 if (kind == Code::FUNCTION || kind == Code::BUILTIN) { 213 if (kind == Code::FUNCTION || kind == Code::BUILTIN) {
211 function->set_code(*lazy_compile); 214 function->set_code(*lazy_compile);
212 shared->set_code(*lazy_compile); 215 shared->set_code(*lazy_compile);
213 } 216 }
214 } 217 }
215 } 218 }
216 } 219 }
217 220
218 221
219 } } // namespace v8::internal 222 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-profiler.h ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698