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

Side by Side Diff: src/extensions/statistics-extension.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 | « no previous file | src/heap.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 2010 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
11 // with the distribution. 11 // with the distribution.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 #define ADD_COUNTER(name) \ 80 #define ADD_COUNTER(name) \
81 result->Set(v8::String::New("count_of_CODE_TYPE_" #name), \ 81 result->Set(v8::String::New("count_of_CODE_TYPE_" #name), \
82 v8::Number::New( \ 82 v8::Number::New( \
83 *counters->count_of_CODE_TYPE_##name()->GetInternalPointer())); \ 83 *counters->count_of_CODE_TYPE_##name()->GetInternalPointer())); \
84 result->Set(v8::String::New("size_of_CODE_TYPE_" #name), \ 84 result->Set(v8::String::New("size_of_CODE_TYPE_" #name), \
85 v8::Number::New( \ 85 v8::Number::New( \
86 *counters->size_of_CODE_TYPE_##name()->GetInternalPointer())); 86 *counters->size_of_CODE_TYPE_##name()->GetInternalPointer()));
87 87
88 CODE_KIND_LIST(ADD_COUNTER) 88 CODE_KIND_LIST(ADD_COUNTER)
89 #undef ADD_COUNTER 89 #undef ADD_COUNTER
90 #define ADD_COUNTER(name) \
91 result->Set(v8::String::New("count_of_FIXED_ARRAY_" #name), \
92 v8::Number::New( \
93 *counters->count_of_FIXED_ARRAY_##name()->GetInternalPointer())); \
94 result->Set(v8::String::New("size_of_FIXED_ARRAY_" #name), \
95 v8::Number::New( \
96 *counters->size_of_FIXED_ARRAY_##name()->GetInternalPointer()));
97
98 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADD_COUNTER)
99 #undef ADD_COUNTER
90 100
91 return result; 101 return result;
92 } 102 }
93 103
94 104
95 void StatisticsExtension::Register() { 105 void StatisticsExtension::Register() {
96 static StatisticsExtension statistics_extension; 106 static StatisticsExtension statistics_extension;
97 static v8::DeclareExtension declaration(&statistics_extension); 107 static v8::DeclareExtension declaration(&statistics_extension);
98 } 108 }
99 109
100 } } // namespace v8::internal 110 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698