OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
448 : ticker_(NULL), | 448 : ticker_(NULL), |
449 profiler_(NULL), | 449 profiler_(NULL), |
450 log_events_(NULL), | 450 log_events_(NULL), |
451 logging_nesting_(0), | 451 logging_nesting_(0), |
452 cpu_profiler_nesting_(0), | 452 cpu_profiler_nesting_(0), |
453 log_(new Log(this)), | 453 log_(new Log(this)), |
454 name_buffer_(new NameBuffer), | 454 name_buffer_(new NameBuffer), |
455 address_to_name_map_(NULL), | 455 address_to_name_map_(NULL), |
456 is_initialized_(false), | 456 is_initialized_(false), |
457 code_event_handler_(NULL), | 457 code_event_handler_(NULL), |
458 support_moved_code_(true), | |
458 last_address_(NULL), | 459 last_address_(NULL), |
459 prev_sp_(NULL), | 460 prev_sp_(NULL), |
460 prev_function_(NULL), | 461 prev_function_(NULL), |
461 prev_to_(NULL), | 462 prev_to_(NULL), |
462 prev_code_(NULL), | 463 prev_code_(NULL), |
463 epoch_(0) { | 464 epoch_(0) { |
464 } | 465 } |
465 | 466 |
466 | 467 |
467 Logger::~Logger() { | 468 Logger::~Logger() { |
468 delete address_to_name_map_; | 469 delete address_to_name_map_; |
469 delete name_buffer_; | 470 delete name_buffer_; |
470 delete log_; | 471 delete log_; |
471 } | 472 } |
472 | 473 |
473 | 474 |
474 void Logger::IssueCodeAddedEvent(Code* code, | 475 void Logger::IssueCodeAddedEvent(Code* code, |
476 Script* script, | |
475 const char* name, | 477 const char* name, |
476 size_t name_len) { | 478 size_t name_len) { |
477 JitCodeEvent event; | 479 JitCodeEvent event; |
480 memset(&event, 0, sizeof(event)); | |
478 event.type = JitCodeEvent::CODE_ADDED; | 481 event.type = JitCodeEvent::CODE_ADDED; |
479 event.code_start = code->instruction_start(); | 482 event.code_start = code->instruction_start(); |
480 event.code_len = code->instruction_size(); | 483 event.code_len = code->instruction_size(); |
484 event.script = v8::Handle<v8::Script>(reinterpret_cast<v8::Script*>(script)); | |
481 event.name.str = name; | 485 event.name.str = name; |
482 event.name.len = name_len; | 486 event.name.len = name_len; |
483 | 487 |
484 code_event_handler_(&event); | 488 code_event_handler_(&event); |
485 } | 489 } |
486 | 490 |
487 | 491 |
488 void Logger::IssueCodeMovedEvent(Address from, Address to) { | 492 void Logger::IssueCodeMovedEvent(Address from, Address to) { |
489 Code* from_code = Code::cast(HeapObject::FromAddress(from)); | 493 Code* from_code = Code::cast(HeapObject::FromAddress(from)); |
490 | 494 |
(...skipping 18 matching lines...) Expand all Loading... | |
509 Code* from_code = Code::cast(HeapObject::FromAddress(from)); | 513 Code* from_code = Code::cast(HeapObject::FromAddress(from)); |
510 | 514 |
511 JitCodeEvent event; | 515 JitCodeEvent event; |
512 event.type = JitCodeEvent::CODE_REMOVED; | 516 event.type = JitCodeEvent::CODE_REMOVED; |
513 event.code_start = from_code->instruction_start(); | 517 event.code_start = from_code->instruction_start(); |
514 event.code_len = from_code->instruction_size(); | 518 event.code_len = from_code->instruction_size(); |
515 | 519 |
516 code_event_handler_(&event); | 520 code_event_handler_(&event); |
517 } | 521 } |
518 | 522 |
523 void Logger::IssueAddCodeLinePosInfoEvent(void* line_info, | |
524 int pc_offset, | |
525 int position, | |
526 JitCodeEvent::PositionType | |
527 position_type) { | |
danno
2013/02/01 13:43:10
nit: indentation
| |
528 JitCodeEvent event; | |
529 event.type = JitCodeEvent::CODE_ADD_LINE_POS_INFO; | |
530 event.user_data = line_info; | |
531 event.line_info.offset = pc_offset; | |
532 event.line_info.pos = position; | |
533 event.line_info.position_type = position_type; | |
534 | |
535 code_event_handler_(&event); | |
536 } | |
537 | |
538 void* Logger::IssueStartCodePosInfoEvent() { | |
539 JitCodeEvent event; | |
540 event.type = JitCodeEvent::CODE_START_LINE_INFO_RECORDING; | |
541 | |
542 code_event_handler_(&event); | |
543 return event.user_data; | |
544 } | |
545 | |
546 void Logger::IssueEndCodePosInfoEvent(Code* code, void* line_info) { | |
547 JitCodeEvent event; | |
548 event.type = JitCodeEvent::CODE_END_LINE_INFO_RECORDING; | |
549 event.code_start = code->instruction_start(); | |
550 event.user_data = line_info; | |
551 | |
552 code_event_handler_(&event); | |
553 } | |
519 | 554 |
520 #define DECLARE_EVENT(ignore1, name) name, | 555 #define DECLARE_EVENT(ignore1, name) name, |
521 static const char* const kLogEventsNames[Logger::NUMBER_OF_LOG_EVENTS] = { | 556 static const char* const kLogEventsNames[Logger::NUMBER_OF_LOG_EVENTS] = { |
522 LOG_EVENTS_AND_TAGS_LIST(DECLARE_EVENT) | 557 LOG_EVENTS_AND_TAGS_LIST(DECLARE_EVENT) |
523 }; | 558 }; |
524 #undef DECLARE_EVENT | 559 #undef DECLARE_EVENT |
525 | 560 |
526 | 561 |
527 void Logger::ProfilerBeginEvent() { | 562 void Logger::ProfilerBeginEvent() { |
528 if (!log_->IsEnabled()) return; | 563 if (!log_->IsEnabled()) return; |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
893 Code* code, | 928 Code* code, |
894 const char* comment) { | 929 const char* comment) { |
895 if (!is_logging_code_events()) return; | 930 if (!is_logging_code_events()) return; |
896 if (FLAG_ll_prof || Serializer::enabled() || code_event_handler_ != NULL) { | 931 if (FLAG_ll_prof || Serializer::enabled() || code_event_handler_ != NULL) { |
897 name_buffer_->Reset(); | 932 name_buffer_->Reset(); |
898 name_buffer_->AppendBytes(kLogEventsNames[tag]); | 933 name_buffer_->AppendBytes(kLogEventsNames[tag]); |
899 name_buffer_->AppendByte(':'); | 934 name_buffer_->AppendByte(':'); |
900 name_buffer_->AppendBytes(comment); | 935 name_buffer_->AppendBytes(comment); |
901 } | 936 } |
902 if (code_event_handler_ != NULL) { | 937 if (code_event_handler_ != NULL) { |
903 IssueCodeAddedEvent(code, name_buffer_->get(), name_buffer_->size()); | 938 IssueCodeAddedEvent(code, NULL, name_buffer_->get(), name_buffer_->size()); |
904 } | 939 } |
905 if (!log_->IsEnabled()) return; | 940 if (!log_->IsEnabled()) return; |
906 if (FLAG_ll_prof) { | 941 if (FLAG_ll_prof) { |
907 LowLevelCodeCreateEvent(code, name_buffer_->get(), name_buffer_->size()); | 942 LowLevelCodeCreateEvent(code, name_buffer_->get(), name_buffer_->size()); |
908 } | 943 } |
909 if (Serializer::enabled()) { | 944 if (Serializer::enabled()) { |
910 RegisterSnapshotCodeName(code, name_buffer_->get(), name_buffer_->size()); | 945 RegisterSnapshotCodeName(code, name_buffer_->get(), name_buffer_->size()); |
911 } | 946 } |
912 if (!FLAG_log_code) return; | 947 if (!FLAG_log_code) return; |
913 LogMessageBuilder msg(this); | 948 LogMessageBuilder msg(this); |
(...skipping 19 matching lines...) Expand all Loading... | |
933 Code* code, | 968 Code* code, |
934 String* name) { | 969 String* name) { |
935 if (!is_logging_code_events()) return; | 970 if (!is_logging_code_events()) return; |
936 if (FLAG_ll_prof || Serializer::enabled() || code_event_handler_ != NULL) { | 971 if (FLAG_ll_prof || Serializer::enabled() || code_event_handler_ != NULL) { |
937 name_buffer_->Reset(); | 972 name_buffer_->Reset(); |
938 name_buffer_->AppendBytes(kLogEventsNames[tag]); | 973 name_buffer_->AppendBytes(kLogEventsNames[tag]); |
939 name_buffer_->AppendByte(':'); | 974 name_buffer_->AppendByte(':'); |
940 name_buffer_->AppendString(name); | 975 name_buffer_->AppendString(name); |
941 } | 976 } |
942 if (code_event_handler_ != NULL) { | 977 if (code_event_handler_ != NULL) { |
943 IssueCodeAddedEvent(code, name_buffer_->get(), name_buffer_->size()); | 978 IssueCodeAddedEvent(code, NULL, name_buffer_->get(), name_buffer_->size()); |
944 } | 979 } |
945 if (!log_->IsEnabled()) return; | 980 if (!log_->IsEnabled()) return; |
946 if (FLAG_ll_prof) { | 981 if (FLAG_ll_prof) { |
947 LowLevelCodeCreateEvent(code, name_buffer_->get(), name_buffer_->size()); | 982 LowLevelCodeCreateEvent(code, name_buffer_->get(), name_buffer_->size()); |
948 } | 983 } |
949 if (Serializer::enabled()) { | 984 if (Serializer::enabled()) { |
950 RegisterSnapshotCodeName(code, name_buffer_->get(), name_buffer_->size()); | 985 RegisterSnapshotCodeName(code, name_buffer_->get(), name_buffer_->size()); |
951 } | 986 } |
952 if (!FLAG_log_code) return; | 987 if (!FLAG_log_code) return; |
953 LogMessageBuilder msg(this); | 988 LogMessageBuilder msg(this); |
(...skipping 26 matching lines...) Expand all Loading... | |
980 String* name) { | 1015 String* name) { |
981 if (!is_logging_code_events()) return; | 1016 if (!is_logging_code_events()) return; |
982 if (FLAG_ll_prof || Serializer::enabled() || code_event_handler_ != NULL) { | 1017 if (FLAG_ll_prof || Serializer::enabled() || code_event_handler_ != NULL) { |
983 name_buffer_->Reset(); | 1018 name_buffer_->Reset(); |
984 name_buffer_->AppendBytes(kLogEventsNames[tag]); | 1019 name_buffer_->AppendBytes(kLogEventsNames[tag]); |
985 name_buffer_->AppendByte(':'); | 1020 name_buffer_->AppendByte(':'); |
986 name_buffer_->AppendBytes(ComputeMarker(code)); | 1021 name_buffer_->AppendBytes(ComputeMarker(code)); |
987 name_buffer_->AppendString(name); | 1022 name_buffer_->AppendString(name); |
988 } | 1023 } |
989 if (code_event_handler_ != NULL) { | 1024 if (code_event_handler_ != NULL) { |
990 IssueCodeAddedEvent(code, name_buffer_->get(), name_buffer_->size()); | 1025 Script* script = |
1026 shared->script()->IsScript() ? Script::cast(shared->script()) : NULL; | |
1027 IssueCodeAddedEvent(code, | |
1028 script, | |
1029 name_buffer_->get(), | |
1030 name_buffer_->size()); | |
991 } | 1031 } |
992 if (!log_->IsEnabled()) return; | 1032 if (!log_->IsEnabled()) return; |
993 if (FLAG_ll_prof) { | 1033 if (FLAG_ll_prof) { |
994 LowLevelCodeCreateEvent(code, name_buffer_->get(), name_buffer_->size()); | 1034 LowLevelCodeCreateEvent(code, name_buffer_->get(), name_buffer_->size()); |
995 } | 1035 } |
996 if (Serializer::enabled()) { | 1036 if (Serializer::enabled()) { |
997 RegisterSnapshotCodeName(code, name_buffer_->get(), name_buffer_->size()); | 1037 RegisterSnapshotCodeName(code, name_buffer_->get(), name_buffer_->size()); |
998 } | 1038 } |
999 if (!FLAG_log_code) return; | 1039 if (!FLAG_log_code) return; |
1000 if (code == Isolate::Current()->builtins()->builtin( | 1040 if (code == Isolate::Current()->builtins()->builtin( |
(...skipping 29 matching lines...) Expand all Loading... | |
1030 name_buffer_->AppendBytes(kLogEventsNames[tag]); | 1070 name_buffer_->AppendBytes(kLogEventsNames[tag]); |
1031 name_buffer_->AppendByte(':'); | 1071 name_buffer_->AppendByte(':'); |
1032 name_buffer_->AppendBytes(ComputeMarker(code)); | 1072 name_buffer_->AppendBytes(ComputeMarker(code)); |
1033 name_buffer_->AppendString(shared->DebugName()); | 1073 name_buffer_->AppendString(shared->DebugName()); |
1034 name_buffer_->AppendByte(' '); | 1074 name_buffer_->AppendByte(' '); |
1035 name_buffer_->AppendString(source); | 1075 name_buffer_->AppendString(source); |
1036 name_buffer_->AppendByte(':'); | 1076 name_buffer_->AppendByte(':'); |
1037 name_buffer_->AppendInt(line); | 1077 name_buffer_->AppendInt(line); |
1038 } | 1078 } |
1039 if (code_event_handler_ != NULL) { | 1079 if (code_event_handler_ != NULL) { |
1040 IssueCodeAddedEvent(code, name_buffer_->get(), name_buffer_->size()); | 1080 Script* script = |
1081 shared->script()->IsScript() ? Script::cast(shared->script()) : NULL; | |
1082 IssueCodeAddedEvent(code, | |
1083 script, | |
1084 name_buffer_->get(), | |
1085 name_buffer_->size()); | |
1041 } | 1086 } |
1042 if (!log_->IsEnabled()) return; | 1087 if (!log_->IsEnabled()) return; |
1043 if (FLAG_ll_prof) { | 1088 if (FLAG_ll_prof) { |
1044 LowLevelCodeCreateEvent(code, name_buffer_->get(), name_buffer_->size()); | 1089 LowLevelCodeCreateEvent(code, name_buffer_->get(), name_buffer_->size()); |
1045 } | 1090 } |
1046 if (Serializer::enabled()) { | 1091 if (Serializer::enabled()) { |
1047 RegisterSnapshotCodeName(code, name_buffer_->get(), name_buffer_->size()); | 1092 RegisterSnapshotCodeName(code, name_buffer_->get(), name_buffer_->size()); |
1048 } | 1093 } |
1049 if (!FLAG_log_code) return; | 1094 if (!FLAG_log_code) return; |
1050 LogMessageBuilder msg(this); | 1095 LogMessageBuilder msg(this); |
(...skipping 20 matching lines...) Expand all Loading... | |
1071 | 1116 |
1072 void Logger::CodeCreateEvent(LogEventsAndTags tag, Code* code, int args_count) { | 1117 void Logger::CodeCreateEvent(LogEventsAndTags tag, Code* code, int args_count) { |
1073 if (!is_logging_code_events()) return; | 1118 if (!is_logging_code_events()) return; |
1074 if (FLAG_ll_prof || Serializer::enabled() || code_event_handler_ != NULL) { | 1119 if (FLAG_ll_prof || Serializer::enabled() || code_event_handler_ != NULL) { |
1075 name_buffer_->Reset(); | 1120 name_buffer_->Reset(); |
1076 name_buffer_->AppendBytes(kLogEventsNames[tag]); | 1121 name_buffer_->AppendBytes(kLogEventsNames[tag]); |
1077 name_buffer_->AppendByte(':'); | 1122 name_buffer_->AppendByte(':'); |
1078 name_buffer_->AppendInt(args_count); | 1123 name_buffer_->AppendInt(args_count); |
1079 } | 1124 } |
1080 if (code_event_handler_ != NULL) { | 1125 if (code_event_handler_ != NULL) { |
1081 IssueCodeAddedEvent(code, name_buffer_->get(), name_buffer_->size()); | 1126 IssueCodeAddedEvent(code, NULL, name_buffer_->get(), name_buffer_->size()); |
1082 } | 1127 } |
1083 if (!log_->IsEnabled()) return; | 1128 if (!log_->IsEnabled()) return; |
1084 if (FLAG_ll_prof) { | 1129 if (FLAG_ll_prof) { |
1085 LowLevelCodeCreateEvent(code, name_buffer_->get(), name_buffer_->size()); | 1130 LowLevelCodeCreateEvent(code, name_buffer_->get(), name_buffer_->size()); |
1086 } | 1131 } |
1087 if (Serializer::enabled()) { | 1132 if (Serializer::enabled()) { |
1088 RegisterSnapshotCodeName(code, name_buffer_->get(), name_buffer_->size()); | 1133 RegisterSnapshotCodeName(code, name_buffer_->get(), name_buffer_->size()); |
1089 } | 1134 } |
1090 if (!FLAG_log_code) return; | 1135 if (!FLAG_log_code) return; |
1091 LogMessageBuilder msg(this); | 1136 LogMessageBuilder msg(this); |
(...skipping 17 matching lines...) Expand all Loading... | |
1109 | 1154 |
1110 void Logger::RegExpCodeCreateEvent(Code* code, String* source) { | 1155 void Logger::RegExpCodeCreateEvent(Code* code, String* source) { |
1111 if (!is_logging_code_events()) return; | 1156 if (!is_logging_code_events()) return; |
1112 if (FLAG_ll_prof || Serializer::enabled() || code_event_handler_ != NULL) { | 1157 if (FLAG_ll_prof || Serializer::enabled() || code_event_handler_ != NULL) { |
1113 name_buffer_->Reset(); | 1158 name_buffer_->Reset(); |
1114 name_buffer_->AppendBytes(kLogEventsNames[REG_EXP_TAG]); | 1159 name_buffer_->AppendBytes(kLogEventsNames[REG_EXP_TAG]); |
1115 name_buffer_->AppendByte(':'); | 1160 name_buffer_->AppendByte(':'); |
1116 name_buffer_->AppendString(source); | 1161 name_buffer_->AppendString(source); |
1117 } | 1162 } |
1118 if (code_event_handler_ != NULL) { | 1163 if (code_event_handler_ != NULL) { |
1119 IssueCodeAddedEvent(code, name_buffer_->get(), name_buffer_->size()); | 1164 IssueCodeAddedEvent(code, NULL, name_buffer_->get(), name_buffer_->size()); |
1120 } | 1165 } |
1121 if (!log_->IsEnabled()) return; | 1166 if (!log_->IsEnabled()) return; |
1122 if (FLAG_ll_prof) { | 1167 if (FLAG_ll_prof) { |
1123 LowLevelCodeCreateEvent(code, name_buffer_->get(), name_buffer_->size()); | 1168 LowLevelCodeCreateEvent(code, name_buffer_->get(), name_buffer_->size()); |
1124 } | 1169 } |
1125 if (Serializer::enabled()) { | 1170 if (Serializer::enabled()) { |
1126 RegisterSnapshotCodeName(code, name_buffer_->get(), name_buffer_->size()); | 1171 RegisterSnapshotCodeName(code, name_buffer_->get(), name_buffer_->size()); |
1127 } | 1172 } |
1128 if (!FLAG_log_code) return; | 1173 if (!FLAG_log_code) return; |
1129 LogMessageBuilder msg(this); | 1174 LogMessageBuilder msg(this); |
(...skipping 23 matching lines...) Expand all Loading... | |
1153 void Logger::CodeDeleteEvent(Address from) { | 1198 void Logger::CodeDeleteEvent(Address from) { |
1154 if (code_event_handler_ != NULL) IssueCodeRemovedEvent(from); | 1199 if (code_event_handler_ != NULL) IssueCodeRemovedEvent(from); |
1155 if (!log_->IsEnabled()) return; | 1200 if (!log_->IsEnabled()) return; |
1156 if (FLAG_ll_prof) LowLevelCodeDeleteEvent(from); | 1201 if (FLAG_ll_prof) LowLevelCodeDeleteEvent(from); |
1157 if (Serializer::enabled() && address_to_name_map_ != NULL) { | 1202 if (Serializer::enabled() && address_to_name_map_ != NULL) { |
1158 address_to_name_map_->Remove(from); | 1203 address_to_name_map_->Remove(from); |
1159 } | 1204 } |
1160 DeleteEventInternal(CODE_DELETE_EVENT, from); | 1205 DeleteEventInternal(CODE_DELETE_EVENT, from); |
1161 } | 1206 } |
1162 | 1207 |
1208 void Logger::CodeLinePosInfoAddEvent(void* line_info, | |
1209 int pc_offset, | |
1210 int position, | |
1211 JitCodeEvent::PositionType position_type) { | |
1212 if (code_event_handler_ != NULL) { | |
1213 IssueAddCodeLinePosInfoEvent(line_info, pc_offset, position, position_type); | |
1214 } | |
1215 } | |
1216 | |
1217 void* Logger::CodeStartLinePosInfoRecordEvent() { | |
1218 if (code_event_handler_ != NULL) { | |
1219 return IssueStartCodePosInfoEvent(); | |
1220 } else { | |
1221 return NULL; | |
1222 } | |
1223 } | |
1224 | |
1225 void Logger::CodeEndLinePosInfoRecordEvent(Code* code, | |
1226 void* line_info) { | |
1227 if (code_event_handler_ != NULL) { | |
1228 IssueEndCodePosInfoEvent(code, line_info); | |
1229 } | |
1230 } | |
1163 | 1231 |
1164 void Logger::SnapshotPositionEvent(Address addr, int pos) { | 1232 void Logger::SnapshotPositionEvent(Address addr, int pos) { |
1165 if (!log_->IsEnabled()) return; | 1233 if (!log_->IsEnabled()) return; |
1166 if (FLAG_ll_prof) LowLevelSnapshotPositionEvent(addr, pos); | 1234 if (FLAG_ll_prof) LowLevelSnapshotPositionEvent(addr, pos); |
1167 if (Serializer::enabled() && address_to_name_map_ != NULL) { | 1235 if (Serializer::enabled() && address_to_name_map_ != NULL) { |
1168 const char* code_name = address_to_name_map_->Lookup(addr); | 1236 const char* code_name = address_to_name_map_->Lookup(addr); |
1169 if (code_name == NULL) return; // Not a code object. | 1237 if (code_name == NULL) return; // Not a code object. |
1170 LogMessageBuilder msg(this); | 1238 LogMessageBuilder msg(this); |
1171 msg.Append("%s,%d,\"", kLogEventsNames[SNAPSHOT_CODE_NAME_EVENT], pos); | 1239 msg.Append("%s,%d,\"", kLogEventsNames[SNAPSHOT_CODE_NAME_EVENT], pos); |
1172 for (const char* p = code_name; *p != '\0'; ++p) { | 1240 for (const char* p = code_name; *p != '\0'; ++p) { |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1726 } | 1794 } |
1727 } | 1795 } |
1728 | 1796 |
1729 if (FLAG_log_internal_timer_events || FLAG_prof) epoch_ = OS::Ticks(); | 1797 if (FLAG_log_internal_timer_events || FLAG_prof) epoch_ = OS::Ticks(); |
1730 | 1798 |
1731 return true; | 1799 return true; |
1732 } | 1800 } |
1733 | 1801 |
1734 | 1802 |
1735 void Logger::SetCodeEventHandler(uint32_t options, | 1803 void Logger::SetCodeEventHandler(uint32_t options, |
1736 JitCodeEventHandler event_handler) { | 1804 JitCodeEventHandler event_handler, |
1805 bool support_moved_code) { | |
1737 code_event_handler_ = event_handler; | 1806 code_event_handler_ = event_handler; |
1738 | 1807 support_moved_code_ = support_moved_code; |
1739 if (code_event_handler_ != NULL && (options & kJitCodeEventEnumExisting)) { | 1808 if (code_event_handler_ != NULL && (options & kJitCodeEventEnumExisting)) { |
1740 HandleScope scope; | 1809 HandleScope scope; |
1741 LogCodeObjects(); | 1810 LogCodeObjects(); |
1742 LogCompiledFunctions(); | 1811 LogCompiledFunctions(); |
1743 } | 1812 } |
1744 } | 1813 } |
1745 | 1814 |
1746 | 1815 |
1747 Sampler* Logger::sampler() { | 1816 Sampler* Logger::sampler() { |
1748 return ticker_; | 1817 return ticker_; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1832 void SamplerRegistry::RemoveActiveSampler(Sampler* sampler) { | 1901 void SamplerRegistry::RemoveActiveSampler(Sampler* sampler) { |
1833 ASSERT(sampler->IsActive()); | 1902 ASSERT(sampler->IsActive()); |
1834 ScopedLock lock(active_samplers_mutex); | 1903 ScopedLock lock(active_samplers_mutex); |
1835 ASSERT(active_samplers_ != NULL); | 1904 ASSERT(active_samplers_ != NULL); |
1836 bool removed = active_samplers_->RemoveElement(sampler); | 1905 bool removed = active_samplers_->RemoveElement(sampler); |
1837 ASSERT(removed); | 1906 ASSERT(removed); |
1838 USE(removed); | 1907 USE(removed); |
1839 } | 1908 } |
1840 | 1909 |
1841 } } // namespace v8::internal | 1910 } } // namespace v8::internal |
OLD | NEW |