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

Side by Side Diff: src/v8-counters.h

Issue 6880010: Merge (7265, 7271] from bleeding_edge to experimental/gc branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 8 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
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 SC(js_opt_ticks, V8.JsOptTicks) \ 250 SC(js_opt_ticks, V8.JsOptTicks) \
251 SC(js_non_opt_ticks, V8.JsNonoptTicks) \ 251 SC(js_non_opt_ticks, V8.JsNonoptTicks) \
252 SC(js_other_ticks, V8.JsOtherTicks) \ 252 SC(js_other_ticks, V8.JsOtherTicks) \
253 SC(smi_checks_removed, V8.SmiChecksRemoved) \ 253 SC(smi_checks_removed, V8.SmiChecksRemoved) \
254 SC(map_checks_removed, V8.MapChecksRemoved) \ 254 SC(map_checks_removed, V8.MapChecksRemoved) \
255 SC(quote_json_char_count, V8.QuoteJsonCharacterCount) \ 255 SC(quote_json_char_count, V8.QuoteJsonCharacterCount) \
256 SC(quote_json_char_recount, V8.QuoteJsonCharacterReCount) 256 SC(quote_json_char_recount, V8.QuoteJsonCharacterReCount)
257 257
258 258
259 // This file contains all the v8 counters that are in use. 259 // This file contains all the v8 counters that are in use.
260 class Counters : AllStatic { 260 class Counters {
261 public: 261 public:
262 #define HT(name, caption) \ 262 #define HT(name, caption) \
263 static HistogramTimer name; 263 HistogramTimer* name() { return &name##_; }
264 HISTOGRAM_TIMER_LIST(HT) 264 HISTOGRAM_TIMER_LIST(HT)
265 #undef HT 265 #undef HT
266 266
267 #define SC(name, caption) \ 267 #define SC(name, caption) \
268 static StatsCounter name; 268 StatsCounter* name() { return &name##_; }
269 STATS_COUNTER_LIST_1(SC) 269 STATS_COUNTER_LIST_1(SC)
270 STATS_COUNTER_LIST_2(SC) 270 STATS_COUNTER_LIST_2(SC)
271 #undef SC 271 #undef SC
272 272
273 enum Id { 273 enum Id {
274 #define RATE_ID(name, caption) k_##name, 274 #define RATE_ID(name, caption) k_##name,
275 HISTOGRAM_TIMER_LIST(RATE_ID) 275 HISTOGRAM_TIMER_LIST(RATE_ID)
276 #undef RATE_ID 276 #undef RATE_ID
277 #define COUNTER_ID(name, caption) k_##name, 277 #define COUNTER_ID(name, caption) k_##name,
278 STATS_COUNTER_LIST_1(COUNTER_ID) 278 STATS_COUNTER_LIST_1(COUNTER_ID)
279 STATS_COUNTER_LIST_2(COUNTER_ID) 279 STATS_COUNTER_LIST_2(COUNTER_ID)
280 #undef COUNTER_ID 280 #undef COUNTER_ID
281 #define COUNTER_ID(name) k_##name, 281 #define COUNTER_ID(name) k_##name,
282 STATE_TAG_LIST(COUNTER_ID) 282 STATE_TAG_LIST(COUNTER_ID)
283 #undef COUNTER_ID 283 #undef COUNTER_ID
284 stats_counter_count 284 stats_counter_count
285 }; 285 };
286 286
287 StatsCounter* state_counters(StateTag state) {
288 return &state_counters_[state];
289 }
290
291 private:
292 #define HT(name, caption) \
293 HistogramTimer name##_;
294 HISTOGRAM_TIMER_LIST(HT)
295 #undef HT
296
297 #define SC(name, caption) \
298 StatsCounter name##_;
299 STATS_COUNTER_LIST_1(SC)
300 STATS_COUNTER_LIST_2(SC)
301 #undef SC
302
303 enum {
304 #define COUNTER_ID(name) __##name,
305 STATE_TAG_LIST(COUNTER_ID)
306 #undef COUNTER_ID
307 kSlidingStateWindowCounterCount
308 };
309
287 // Sliding state window counters. 310 // Sliding state window counters.
288 static StatsCounter state_counters[]; 311 StatsCounter state_counters_[kSlidingStateWindowCounterCount];
312 friend class Isolate;
313
314 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters);
289 }; 315 };
290 316
317 #define COUNTERS Isolate::Current()->counters()
318
291 } } // namespace v8::internal 319 } } // namespace v8::internal
292 320
293 #endif // V8_V8_COUNTERS_H_ 321 #endif // V8_V8_COUNTERS_H_
OLDNEW
« src/store-buffer.cc ('K') | « src/v8.cc ('k') | src/v8-counters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698