OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 2287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2298 while (!it.done()) { | 2298 while (!it.done()) { |
2299 if (it.rinfo()->rmode() == RelocInfo::COMMENT) { | 2299 if (it.rinfo()->rmode() == RelocInfo::COMMENT) { |
2300 delta += static_cast<int>(it.rinfo()->pc() - prev_pc); | 2300 delta += static_cast<int>(it.rinfo()->pc() - prev_pc); |
2301 CollectCommentStatistics(&it); | 2301 CollectCommentStatistics(&it); |
2302 prev_pc = it.rinfo()->pc(); | 2302 prev_pc = it.rinfo()->pc(); |
2303 } | 2303 } |
2304 it.next(); | 2304 it.next(); |
2305 } | 2305 } |
2306 | 2306 |
2307 ASSERT(code->instruction_start() <= prev_pc && | 2307 ASSERT(code->instruction_start() <= prev_pc && |
2308 prev_pc <= code->relocation_start()); | 2308 prev_pc <= code->instruction_end()); |
2309 delta += static_cast<int>(code->relocation_start() - prev_pc); | 2309 delta += static_cast<int>(code->instruction_end() - prev_pc); |
2310 EnterComment("NoComment", delta); | 2310 EnterComment("NoComment", delta); |
2311 } | 2311 } |
2312 } | 2312 } |
2313 } | 2313 } |
2314 | 2314 |
2315 | 2315 |
2316 void OldSpace::ReportStatistics() { | 2316 void OldSpace::ReportStatistics() { |
2317 int pct = Available() * 100 / Capacity(); | 2317 int pct = Available() * 100 / Capacity(); |
2318 PrintF(" capacity: %d, waste: %d, available: %d, %%%d\n", | 2318 PrintF(" capacity: %d, waste: %d, available: %d, %%%d\n", |
2319 Capacity(), Waste(), Available(), pct); | 2319 Capacity(), Waste(), Available(), pct); |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2890 for (HeapObject* obj = obj_it.next(); obj != NULL; obj = obj_it.next()) { | 2890 for (HeapObject* obj = obj_it.next(); obj != NULL; obj = obj_it.next()) { |
2891 if (obj->IsCode()) { | 2891 if (obj->IsCode()) { |
2892 Code* code = Code::cast(obj); | 2892 Code* code = Code::cast(obj); |
2893 code_kind_statistics[code->kind()] += code->Size(); | 2893 code_kind_statistics[code->kind()] += code->Size(); |
2894 } | 2894 } |
2895 } | 2895 } |
2896 } | 2896 } |
2897 #endif // DEBUG | 2897 #endif // DEBUG |
2898 | 2898 |
2899 } } // namespace v8::internal | 2899 } } // namespace v8::internal |
OLD | NEW |