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

Side by Side Diff: src/heap.cc

Issue 10797008: Refine object stats for FixedArrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 8 years, 5 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/heap.h ('k') | src/mark-compact.cc » ('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 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 7206 matching lines...) Expand 10 before | Expand all | Expand 10 after
7217 counters->count_of_CODE_TYPE_##name()->Increment( \ 7217 counters->count_of_CODE_TYPE_##name()->Increment( \
7218 static_cast<int>(object_counts_[index])); \ 7218 static_cast<int>(object_counts_[index])); \
7219 counters->count_of_CODE_TYPE_##name()->Decrement( \ 7219 counters->count_of_CODE_TYPE_##name()->Decrement( \
7220 static_cast<int>(object_counts_last_time_[index])); \ 7220 static_cast<int>(object_counts_last_time_[index])); \
7221 counters->size_of_CODE_TYPE_##name()->Increment( \ 7221 counters->size_of_CODE_TYPE_##name()->Increment( \
7222 static_cast<int>(object_sizes_[index])); \ 7222 static_cast<int>(object_sizes_[index])); \
7223 counters->size_of_CODE_TYPE_##name()->Decrement( \ 7223 counters->size_of_CODE_TYPE_##name()->Decrement( \
7224 static_cast<int>(object_sizes_last_time_[index])); 7224 static_cast<int>(object_sizes_last_time_[index]));
7225 CODE_KIND_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) 7225 CODE_KIND_LIST(ADJUST_LAST_TIME_OBJECT_COUNT)
7226 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7226 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7227 #define ADJUST_LAST_TIME_OBJECT_COUNT(name) \
7228 index = FIRST_FIXED_ARRAY_SUB_TYPE + name; \
7229 counters->count_of_FIXED_ARRAY_##name()->Increment( \
7230 static_cast<int>(object_counts_[index])); \
7231 counters->count_of_FIXED_ARRAY_##name()->Decrement( \
7232 static_cast<int>(object_counts_last_time_[index])); \
7233 counters->size_of_FIXED_ARRAY_##name()->Increment( \
7234 static_cast<int>(object_sizes_[index])); \
7235 counters->size_of_FIXED_ARRAY_##name()->Decrement( \
7236 static_cast<int>(object_sizes_last_time_[index]));
7237 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT)
7238 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7227 7239
7228 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7240 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7229 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7241 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7230 ClearObjectStats(); 7242 ClearObjectStats();
7231 } 7243 }
7232 7244
7233 } } // namespace v8::internal 7245 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698