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

Side by Side Diff: src/counters.cc

Issue 365153002: Remove a bunch of Isolate::UncheckedCurrent calls (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 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
« include/v8.h ('K') | « src/counters.h ('k') | src/d8.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/base/platform/platform.h" 7 #include "src/base/platform/platform.h"
8 #include "src/counters.h" 8 #include "src/counters.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 #define SC(name) \ 102 #define SC(name) \
103 count_of_CODE_AGE_##name##_ = \ 103 count_of_CODE_AGE_##name##_ = \
104 StatsCounter(isolate, "c:" "V8.CountOf_CODE_AGE-" #name); \ 104 StatsCounter(isolate, "c:" "V8.CountOf_CODE_AGE-" #name); \
105 size_of_CODE_AGE_##name##_ = \ 105 size_of_CODE_AGE_##name##_ = \
106 StatsCounter(isolate, "c:" "V8.SizeOf_CODE_AGE-" #name); 106 StatsCounter(isolate, "c:" "V8.SizeOf_CODE_AGE-" #name);
107 CODE_AGE_LIST_COMPLETE(SC) 107 CODE_AGE_LIST_COMPLETE(SC)
108 #undef SC 108 #undef SC
109 } 109 }
110 110
111 111
112 void Counters::ResetCounters() {
113 #define SC(name, caption) name##_.Reset();
114 STATS_COUNTER_LIST_1(SC)
115 STATS_COUNTER_LIST_2(SC)
116 #undef SC
117
118 #define SC(name) \
119 count_of_##name##_.Reset(); \
120 size_of_##name##_.Reset();
121 INSTANCE_TYPE_LIST(SC)
122 #undef SC
123
124 #define SC(name) \
125 count_of_CODE_TYPE_##name##_.Reset(); \
126 size_of_CODE_TYPE_##name##_.Reset();
127 CODE_KIND_LIST(SC)
128 #undef SC
129
130 #define SC(name) \
131 count_of_FIXED_ARRAY_##name##_.Reset(); \
132 size_of_FIXED_ARRAY_##name##_.Reset();
133 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC)
134 #undef SC
135
136 #define SC(name) \
137 count_of_CODE_AGE_##name##_.Reset(); \
138 size_of_CODE_AGE_##name##_.Reset();
139 CODE_AGE_LIST_COMPLETE(SC)
140 #undef SC
141 }
142
143
112 void Counters::ResetHistograms() { 144 void Counters::ResetHistograms() {
113 #define HT(name, caption) name##_.Reset(); 145 #define HT(name, caption) name##_.Reset();
114 HISTOGRAM_TIMER_LIST(HT) 146 HISTOGRAM_TIMER_LIST(HT)
115 #undef HT 147 #undef HT
116 148
117 #define HP(name, caption) name##_.Reset(); 149 #define HP(name, caption) name##_.Reset();
118 HISTOGRAM_PERCENTAGE_LIST(HP) 150 HISTOGRAM_PERCENTAGE_LIST(HP)
119 #undef HP 151 #undef HP
120 152
121 #define HM(name, caption) name##_.Reset(); 153 #define HM(name, caption) name##_.Reset();
122 HISTOGRAM_MEMORY_LIST(HM) 154 HISTOGRAM_MEMORY_LIST(HM)
123 #undef HM 155 #undef HM
124 } 156 }
125 157
126 } } // namespace v8::internal 158 } } // namespace v8::internal
OLDNEW
« include/v8.h ('K') | « src/counters.h ('k') | src/d8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698