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

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

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/objects.h ('k') | src/v8-counters.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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 #undef SC 316 #undef SC
317 317
318 #define SC(name) \ 318 #define SC(name) \
319 StatsCounter* count_of_CODE_TYPE_##name() \ 319 StatsCounter* count_of_CODE_TYPE_##name() \
320 { return &count_of_CODE_TYPE_##name##_; } \ 320 { return &count_of_CODE_TYPE_##name##_; } \
321 StatsCounter* size_of_CODE_TYPE_##name() \ 321 StatsCounter* size_of_CODE_TYPE_##name() \
322 { return &size_of_CODE_TYPE_##name##_; } 322 { return &size_of_CODE_TYPE_##name##_; }
323 CODE_KIND_LIST(SC) 323 CODE_KIND_LIST(SC)
324 #undef SC 324 #undef SC
325 325
326 #define SC(name) \
327 StatsCounter* count_of_FIXED_ARRAY_##name() \
328 { return &count_of_FIXED_ARRAY_##name##_; } \
329 StatsCounter* size_of_FIXED_ARRAY_##name() \
330 { return &size_of_FIXED_ARRAY_##name##_; }
331 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC)
332 #undef SC
333
326 enum Id { 334 enum Id {
327 #define RATE_ID(name, caption) k_##name, 335 #define RATE_ID(name, caption) k_##name,
328 HISTOGRAM_TIMER_LIST(RATE_ID) 336 HISTOGRAM_TIMER_LIST(RATE_ID)
329 #undef RATE_ID 337 #undef RATE_ID
330 #define PERCENTAGE_ID(name, caption) k_##name, 338 #define PERCENTAGE_ID(name, caption) k_##name,
331 HISTOGRAM_PERCENTAGE_LIST(PERCENTAGE_ID) 339 HISTOGRAM_PERCENTAGE_LIST(PERCENTAGE_ID)
332 #undef PERCENTAGE_ID 340 #undef PERCENTAGE_ID
333 #define COUNTER_ID(name, caption) k_##name, 341 #define COUNTER_ID(name, caption) k_##name,
334 STATS_COUNTER_LIST_1(COUNTER_ID) 342 STATS_COUNTER_LIST_1(COUNTER_ID)
335 STATS_COUNTER_LIST_2(COUNTER_ID) 343 STATS_COUNTER_LIST_2(COUNTER_ID)
336 #undef COUNTER_ID 344 #undef COUNTER_ID
337 #define COUNTER_ID(name) kCountOf##name, kSizeOf##name, 345 #define COUNTER_ID(name) kCountOf##name, kSizeOf##name,
338 INSTANCE_TYPE_LIST(COUNTER_ID) 346 INSTANCE_TYPE_LIST(COUNTER_ID)
339 #undef COUNTER_ID 347 #undef COUNTER_ID
340 #define COUNTER_ID(name) kCountOfCODE_TYPE_##name, \ 348 #define COUNTER_ID(name) kCountOfCODE_TYPE_##name, \
341 kSizeOfCODE_TYPE_##name, 349 kSizeOfCODE_TYPE_##name,
342 CODE_KIND_LIST(COUNTER_ID) 350 CODE_KIND_LIST(COUNTER_ID)
343 #undef COUNTER_ID 351 #undef COUNTER_ID
352 #define COUNTER_ID(name) kCountOfFIXED_ARRAY__##name, \
353 kSizeOfFIXED_ARRAY__##name,
354 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(COUNTER_ID)
355 #undef COUNTER_ID
344 #define COUNTER_ID(name) k_##name, 356 #define COUNTER_ID(name) k_##name,
345 STATE_TAG_LIST(COUNTER_ID) 357 STATE_TAG_LIST(COUNTER_ID)
346 #undef COUNTER_ID 358 #undef COUNTER_ID
347 stats_counter_count 359 stats_counter_count
348 }; 360 };
349 361
350 StatsCounter* state_counters(StateTag state) { 362 StatsCounter* state_counters(StateTag state) {
351 return &state_counters_[state]; 363 return &state_counters_[state];
352 } 364 }
353 365
(...skipping 19 matching lines...) Expand all
373 StatsCounter count_of_##name##_; 385 StatsCounter count_of_##name##_;
374 INSTANCE_TYPE_LIST(SC) 386 INSTANCE_TYPE_LIST(SC)
375 #undef SC 387 #undef SC
376 388
377 #define SC(name) \ 389 #define SC(name) \
378 StatsCounter size_of_CODE_TYPE_##name##_; \ 390 StatsCounter size_of_CODE_TYPE_##name##_; \
379 StatsCounter count_of_CODE_TYPE_##name##_; 391 StatsCounter count_of_CODE_TYPE_##name##_;
380 CODE_KIND_LIST(SC) 392 CODE_KIND_LIST(SC)
381 #undef SC 393 #undef SC
382 394
395 #define SC(name) \
396 StatsCounter size_of_FIXED_ARRAY_##name##_; \
397 StatsCounter count_of_FIXED_ARRAY_##name##_;
398 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(SC)
399 #undef SC
400
383 enum { 401 enum {
384 #define COUNTER_ID(name) __##name, 402 #define COUNTER_ID(name) __##name,
385 STATE_TAG_LIST(COUNTER_ID) 403 STATE_TAG_LIST(COUNTER_ID)
386 #undef COUNTER_ID 404 #undef COUNTER_ID
387 kSlidingStateWindowCounterCount 405 kSlidingStateWindowCounterCount
388 }; 406 };
389 407
390 // Sliding state window counters. 408 // Sliding state window counters.
391 StatsCounter state_counters_[kSlidingStateWindowCounterCount]; 409 StatsCounter state_counters_[kSlidingStateWindowCounterCount];
392 friend class Isolate; 410 friend class Isolate;
393 411
394 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); 412 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters);
395 }; 413 };
396 414
397 } } // namespace v8::internal 415 } } // namespace v8::internal
398 416
399 #endif // V8_V8_COUNTERS_H_ 417 #endif // V8_V8_COUNTERS_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/v8-counters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698