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

Side by Side Diff: src/heap.h

Issue 61863002: Fix incorrect ASSERT when recording code age stats. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after
1816 }; 1816 };
1817 1817
1818 void RecordObjectStats(InstanceType type, size_t size) { 1818 void RecordObjectStats(InstanceType type, size_t size) {
1819 ASSERT(type <= LAST_TYPE); 1819 ASSERT(type <= LAST_TYPE);
1820 object_counts_[type]++; 1820 object_counts_[type]++;
1821 object_sizes_[type] += size; 1821 object_sizes_[type] += size;
1822 } 1822 }
1823 1823
1824 void RecordCodeSubTypeStats(int code_sub_type, int code_age, size_t size) { 1824 void RecordCodeSubTypeStats(int code_sub_type, int code_age, size_t size) {
1825 ASSERT(code_sub_type < Code::NUMBER_OF_KINDS); 1825 ASSERT(code_sub_type < Code::NUMBER_OF_KINDS);
1826 ASSERT(code_age < Code::kLastCodeAge); 1826 ASSERT(code_age <= Code::kLastCodeAge);
1827 object_counts_[FIRST_CODE_KIND_SUB_TYPE + code_sub_type]++; 1827 object_counts_[FIRST_CODE_KIND_SUB_TYPE + code_sub_type]++;
1828 object_sizes_[FIRST_CODE_KIND_SUB_TYPE + code_sub_type] += size; 1828 object_sizes_[FIRST_CODE_KIND_SUB_TYPE + code_sub_type] += size;
1829 object_counts_[FIRST_CODE_AGE_SUB_TYPE + code_age]++; 1829 object_counts_[FIRST_CODE_AGE_SUB_TYPE + code_age]++;
1830 object_sizes_[FIRST_CODE_AGE_SUB_TYPE + code_age] += size; 1830 object_sizes_[FIRST_CODE_AGE_SUB_TYPE + code_age] += size;
1831 } 1831 }
1832 1832
1833 void RecordFixedArraySubTypeStats(int array_sub_type, size_t size) { 1833 void RecordFixedArraySubTypeStats(int array_sub_type, size_t size) {
1834 ASSERT(array_sub_type <= LAST_FIXED_ARRAY_SUB_TYPE); 1834 ASSERT(array_sub_type <= LAST_FIXED_ARRAY_SUB_TYPE);
1835 object_counts_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type]++; 1835 object_counts_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type]++;
1836 object_sizes_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type] += size; 1836 object_sizes_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type] += size;
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after
3070 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 3070 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
3071 3071
3072 private: 3072 private:
3073 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3073 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3074 }; 3074 };
3075 #endif // DEBUG 3075 #endif // DEBUG
3076 3076
3077 } } // namespace v8::internal 3077 } } // namespace v8::internal
3078 3078
3079 #endif // V8_HEAP_H_ 3079 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698