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 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1287 case Code::CALL_IC: | 1287 case Code::CALL_IC: |
1288 description = "A call IC from the snapshot"; | 1288 description = "A call IC from the snapshot"; |
1289 tag = Logger::CALL_IC_TAG; | 1289 tag = Logger::CALL_IC_TAG; |
1290 break; | 1290 break; |
1291 } | 1291 } |
1292 LOG(CodeCreateEvent(tag, code_object, description)); | 1292 LOG(CodeCreateEvent(tag, code_object, description)); |
1293 } | 1293 } |
1294 } | 1294 } |
1295 | 1295 |
1296 | 1296 |
1297 void Logger::LogCodeObjects() { | |
1298 AssertNoAllocation no_alloc; | |
1299 HeapIterator iterator; | |
1300 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) { | |
1301 if (!obj->IsCode()) continue; | |
1302 LogCodeObject(obj); | |
Erik Corry
2010/02/04 20:52:54
Seems like
if (obj->IsCode()) LogCodeObject(obj)
w
mnaganov (inactive)
2010/02/04 21:33:06
Indeed. Fixed.
| |
1303 } | |
1304 } | |
1305 | |
1306 | |
1297 void Logger::LogCompiledFunctions() { | 1307 void Logger::LogCompiledFunctions() { |
1298 HandleScope scope; | 1308 HandleScope scope; |
1299 const int compiled_funcs_count = EnumerateCompiledFunctions(NULL); | 1309 const int compiled_funcs_count = EnumerateCompiledFunctions(NULL); |
1300 Handle<SharedFunctionInfo>* sfis = | 1310 Handle<SharedFunctionInfo>* sfis = |
1301 NewArray< Handle<SharedFunctionInfo> >(compiled_funcs_count); | 1311 NewArray< Handle<SharedFunctionInfo> >(compiled_funcs_count); |
1302 EnumerateCompiledFunctions(sfis); | 1312 EnumerateCompiledFunctions(sfis); |
1303 | 1313 |
1304 // During iteration, there can be heap allocation due to | 1314 // During iteration, there can be heap allocation due to |
1305 // GetScriptLineNumber call. | 1315 // GetScriptLineNumber call. |
1306 for (int i = 0; i < compiled_funcs_count; ++i) { | 1316 for (int i = 0; i < compiled_funcs_count; ++i) { |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1532 // Otherwise, if the sliding state window computation has not been | 1542 // Otherwise, if the sliding state window computation has not been |
1533 // started we do it now. | 1543 // started we do it now. |
1534 if (sliding_state_window_ == NULL) { | 1544 if (sliding_state_window_ == NULL) { |
1535 sliding_state_window_ = new SlidingStateWindow(); | 1545 sliding_state_window_ = new SlidingStateWindow(); |
1536 } | 1546 } |
1537 #endif | 1547 #endif |
1538 } | 1548 } |
1539 | 1549 |
1540 | 1550 |
1541 } } // namespace v8::internal | 1551 } } // namespace v8::internal |
OLD | NEW |