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 1932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1943 allocated_histogram_[i].name(), | 1943 allocated_histogram_[i].name(), |
1944 allocated_histogram_[i].number(), | 1944 allocated_histogram_[i].number(), |
1945 allocated_histogram_[i].bytes()); | 1945 allocated_histogram_[i].bytes()); |
1946 } | 1946 } |
1947 } | 1947 } |
1948 PrintF("\n"); | 1948 PrintF("\n"); |
1949 } | 1949 } |
1950 #endif // DEBUG | 1950 #endif // DEBUG |
1951 | 1951 |
1952 if (FLAG_log_gc) { | 1952 if (FLAG_log_gc) { |
1953 Isolate* isolate = ISOLATE; | 1953 Isolate* isolate = heap()->isolate(); |
1954 DoReportStatistics(isolate, allocated_histogram_, "allocated"); | 1954 DoReportStatistics(isolate, allocated_histogram_, "allocated"); |
1955 DoReportStatistics(isolate, promoted_histogram_, "promoted"); | 1955 DoReportStatistics(isolate, promoted_histogram_, "promoted"); |
1956 } | 1956 } |
1957 } | 1957 } |
1958 | 1958 |
1959 | 1959 |
1960 void NewSpace::RecordAllocation(HeapObject* obj) { | 1960 void NewSpace::RecordAllocation(HeapObject* obj) { |
1961 InstanceType type = obj->map()->instance_type(); | 1961 InstanceType type = obj->map()->instance_type(); |
1962 ASSERT(0 <= type && type <= LAST_TYPE); | 1962 ASSERT(0 <= type && type <= LAST_TYPE); |
1963 allocated_histogram_[type].increment_number(1); | 1963 allocated_histogram_[type].increment_number(1); |
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3221 object->ShortPrint(); | 3221 object->ShortPrint(); |
3222 PrintF("\n"); | 3222 PrintF("\n"); |
3223 } | 3223 } |
3224 printf(" --------------------------------------\n"); | 3224 printf(" --------------------------------------\n"); |
3225 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3225 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
3226 } | 3226 } |
3227 | 3227 |
3228 #endif // DEBUG | 3228 #endif // DEBUG |
3229 | 3229 |
3230 } } // namespace v8::internal | 3230 } } // namespace v8::internal |
OLD | NEW |