OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1371 LogMessageBuilder msg; | 1371 LogMessageBuilder msg; |
1372 msg.Append("code-info,%s,%d\n", arch, Code::kHeaderSize); | 1372 msg.Append("code-info,%s,%d\n", arch, Code::kHeaderSize); |
1373 msg.WriteToLogFile(); | 1373 msg.WriteToLogFile(); |
1374 #endif // ENABLE_LOGGING_AND_PROFILING | 1374 #endif // ENABLE_LOGGING_AND_PROFILING |
1375 } | 1375 } |
1376 | 1376 |
1377 | 1377 |
1378 void Logger::LowLevelCodeCreateEvent(Code* code, LogMessageBuilder* msg) { | 1378 void Logger::LowLevelCodeCreateEvent(Code* code, LogMessageBuilder* msg) { |
1379 if (!FLAG_ll_prof || Log::output_code_handle_ == NULL) return; | 1379 if (!FLAG_ll_prof || Log::output_code_handle_ == NULL) return; |
1380 int pos = static_cast<int>(ftell(Log::output_code_handle_)); | 1380 int pos = static_cast<int>(ftell(Log::output_code_handle_)); |
1381 int rv = fwrite(code->instruction_start(), 1, code->instruction_size(), | 1381 size_t rv = fwrite(code->instruction_start(), 1, code->instruction_size(), |
1382 Log::output_code_handle_); | 1382 Log::output_code_handle_); |
1383 ASSERT(static_cast<size_t>(code->instruction_size()) == rv); | 1383 ASSERT(static_cast<size_t>(code->instruction_size()) == rv); |
1384 USE(rv); | 1384 USE(rv); |
1385 msg->Append(",%d", pos); | 1385 msg->Append(",%d", pos); |
1386 } | 1386 } |
1387 | 1387 |
1388 | 1388 |
1389 void Logger::LogCodeObjects() { | 1389 void Logger::LogCodeObjects() { |
1390 AssertNoAllocation no_alloc; | 1390 AssertNoAllocation no_alloc; |
1391 HeapIterator iterator; | 1391 HeapIterator iterator; |
1392 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) { | 1392 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) { |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1641 } | 1641 } |
1642 // Otherwise, if the sliding state window computation has not been | 1642 // Otherwise, if the sliding state window computation has not been |
1643 // started we do it now. | 1643 // started we do it now. |
1644 if (sliding_state_window_ == NULL) { | 1644 if (sliding_state_window_ == NULL) { |
1645 sliding_state_window_ = new SlidingStateWindow(); | 1645 sliding_state_window_ = new SlidingStateWindow(); |
1646 } | 1646 } |
1647 #endif | 1647 #endif |
1648 } | 1648 } |
1649 | 1649 |
1650 } } // namespace v8::internal | 1650 } } // namespace v8::internal |
OLD | NEW |