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

Side by Side Diff: src/heap.cc

Issue 10795074: Add a new API V8::SetJitCodeEventHandler to push code name and location to users such as profilers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix instruction address calculation on move events. Fix test use of map, fix compilation on Win64. Created 8 years, 3 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/cpu-profiler.h ('k') | src/isolate.cc » ('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 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after
1734 heap->CopyBlock(target->address(), source->address(), size); 1734 heap->CopyBlock(target->address(), source->address(), size);
1735 1735
1736 // Set the forwarding address. 1736 // Set the forwarding address.
1737 source->set_map_word(MapWord::FromForwardingAddress(target)); 1737 source->set_map_word(MapWord::FromForwardingAddress(target));
1738 1738
1739 if (logging_and_profiling_mode == LOGGING_AND_PROFILING_ENABLED) { 1739 if (logging_and_profiling_mode == LOGGING_AND_PROFILING_ENABLED) {
1740 // Update NewSpace stats if necessary. 1740 // Update NewSpace stats if necessary.
1741 RecordCopiedObject(heap, target); 1741 RecordCopiedObject(heap, target);
1742 HEAP_PROFILE(heap, ObjectMoveEvent(source->address(), target->address())); 1742 HEAP_PROFILE(heap, ObjectMoveEvent(source->address(), target->address()));
1743 Isolate* isolate = heap->isolate(); 1743 Isolate* isolate = heap->isolate();
1744 if (isolate->logger()->is_logging() || 1744 if (isolate->logger()->is_logging_code_events() ||
1745 CpuProfiler::is_profiling(isolate)) { 1745 CpuProfiler::is_profiling(isolate)) {
1746 if (target->IsSharedFunctionInfo()) { 1746 if (target->IsSharedFunctionInfo()) {
1747 PROFILE(isolate, SharedFunctionInfoMoveEvent( 1747 PROFILE(isolate, SharedFunctionInfoMoveEvent(
1748 source->address(), target->address())); 1748 source->address(), target->address()));
1749 } 1749 }
1750 } 1750 }
1751 } 1751 }
1752 1752
1753 if (marks_handling == TRANSFER_MARKS) { 1753 if (marks_handling == TRANSFER_MARKS) {
1754 if (Marking::TransferColor(source, target)) { 1754 if (Marking::TransferColor(source, target)) {
(...skipping 5530 matching lines...) Expand 10 before | Expand all | Expand 10 after
7285 static_cast<int>(object_sizes_last_time_[index])); 7285 static_cast<int>(object_sizes_last_time_[index]));
7286 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) 7286 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT)
7287 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7287 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7288 7288
7289 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7289 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7290 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7290 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7291 ClearObjectStats(); 7291 ClearObjectStats();
7292 } 7292 }
7293 7293
7294 } } // namespace v8::internal 7294 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/cpu-profiler.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698