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

Side by Side Diff: src/log.cc

Issue 655002: Merge revisions 3777-3813 from bleding_edge to partial snapshots ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: Created 10 years, 10 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/log.h ('k') | src/macro-assembler.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 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 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 1254
1255 void Logger::LogCodeObject(Object* object) { 1255 void Logger::LogCodeObject(Object* object) {
1256 if (FLAG_log_code) { 1256 if (FLAG_log_code) {
1257 Code* code_object = Code::cast(object); 1257 Code* code_object = Code::cast(object);
1258 LogEventsAndTags tag = Logger::STUB_TAG; 1258 LogEventsAndTags tag = Logger::STUB_TAG;
1259 const char* description = "Unknown code from the snapshot"; 1259 const char* description = "Unknown code from the snapshot";
1260 switch (code_object->kind()) { 1260 switch (code_object->kind()) {
1261 case Code::FUNCTION: 1261 case Code::FUNCTION:
1262 return; // We log this later using LogCompiledFunctions. 1262 return; // We log this later using LogCompiledFunctions.
1263 case Code::STUB: 1263 case Code::STUB:
1264 description = CodeStub::MajorName(code_object->major_key()); 1264 description = CodeStub::MajorName(code_object->major_key(), true);
1265 if (description == NULL)
1266 description = "A stub from the snapshot";
1265 tag = Logger::STUB_TAG; 1267 tag = Logger::STUB_TAG;
1266 break; 1268 break;
1267 case Code::BUILTIN: 1269 case Code::BUILTIN:
1268 description = "A builtin from the snapshot"; 1270 description = "A builtin from the snapshot";
1269 tag = Logger::BUILTIN_TAG; 1271 tag = Logger::BUILTIN_TAG;
1270 break; 1272 break;
1271 case Code::KEYED_LOAD_IC: 1273 case Code::KEYED_LOAD_IC:
1272 description = "A keyed load IC from the snapshot"; 1274 description = "A keyed load IC from the snapshot";
1273 tag = Logger::KEYED_LOAD_IC_TAG; 1275 tag = Logger::KEYED_LOAD_IC_TAG;
1274 break; 1276 break;
(...skipping 12 matching lines...) Expand all
1287 case Code::CALL_IC: 1289 case Code::CALL_IC:
1288 description = "A call IC from the snapshot"; 1290 description = "A call IC from the snapshot";
1289 tag = Logger::CALL_IC_TAG; 1291 tag = Logger::CALL_IC_TAG;
1290 break; 1292 break;
1291 } 1293 }
1292 LOG(CodeCreateEvent(tag, code_object, description)); 1294 LOG(CodeCreateEvent(tag, code_object, description));
1293 } 1295 }
1294 } 1296 }
1295 1297
1296 1298
1299 void Logger::LogCodeObjects() {
1300 AssertNoAllocation no_alloc;
1301 HeapIterator iterator;
1302 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
1303 if (obj->IsCode()) LogCodeObject(obj);
1304 }
1305 }
1306
1307
1297 void Logger::LogCompiledFunctions() { 1308 void Logger::LogCompiledFunctions() {
1298 HandleScope scope; 1309 HandleScope scope;
1299 const int compiled_funcs_count = EnumerateCompiledFunctions(NULL); 1310 const int compiled_funcs_count = EnumerateCompiledFunctions(NULL);
1300 Handle<SharedFunctionInfo>* sfis = 1311 Handle<SharedFunctionInfo>* sfis =
1301 NewArray< Handle<SharedFunctionInfo> >(compiled_funcs_count); 1312 NewArray< Handle<SharedFunctionInfo> >(compiled_funcs_count);
1302 EnumerateCompiledFunctions(sfis); 1313 EnumerateCompiledFunctions(sfis);
1303 1314
1304 // During iteration, there can be heap allocation due to 1315 // During iteration, there can be heap allocation due to
1305 // GetScriptLineNumber call. 1316 // GetScriptLineNumber call.
1306 for (int i = 0; i < compiled_funcs_count; ++i) { 1317 for (int i = 0; i < compiled_funcs_count; ++i) {
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1532 // Otherwise, if the sliding state window computation has not been 1543 // Otherwise, if the sliding state window computation has not been
1533 // started we do it now. 1544 // started we do it now.
1534 if (sliding_state_window_ == NULL) { 1545 if (sliding_state_window_ == NULL) {
1535 sliding_state_window_ = new SlidingStateWindow(); 1546 sliding_state_window_ = new SlidingStateWindow();
1536 } 1547 }
1537 #endif 1548 #endif
1538 } 1549 }
1539 1550
1540 1551
1541 } } // namespace v8::internal 1552 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/log.h ('k') | src/macro-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698