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

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

Issue 10792014: Track counts/sizes of CODE sub types with --track-gc-object-stats (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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 STATS_COUNTER_LIST_1(SC) 308 STATS_COUNTER_LIST_1(SC)
309 STATS_COUNTER_LIST_2(SC) 309 STATS_COUNTER_LIST_2(SC)
310 #undef SC 310 #undef SC
311 311
312 #define SC(name) \ 312 #define SC(name) \
313 StatsCounter* count_of_##name() { return &count_of_##name##_; } \ 313 StatsCounter* count_of_##name() { return &count_of_##name##_; } \
314 StatsCounter* size_of_##name() { return &size_of_##name##_; } 314 StatsCounter* size_of_##name() { return &size_of_##name##_; }
315 INSTANCE_TYPE_LIST(SC) 315 INSTANCE_TYPE_LIST(SC)
316 #undef SC 316 #undef SC
317 317
318 #define SC(name) \
319 StatsCounter* count_of_CODE_TYPE_##name() \
320 { return &count_of_CODE_TYPE_##name##_; } \
321 StatsCounter* size_of_CODE_TYPE_##name() \
322 { return &size_of_CODE_TYPE_##name##_; }
323 CODE_KIND_LIST(SC)
324 #undef SC
325
318 enum Id { 326 enum Id {
319 #define RATE_ID(name, caption) k_##name, 327 #define RATE_ID(name, caption) k_##name,
320 HISTOGRAM_TIMER_LIST(RATE_ID) 328 HISTOGRAM_TIMER_LIST(RATE_ID)
321 #undef RATE_ID 329 #undef RATE_ID
322 #define PERCENTAGE_ID(name, caption) k_##name, 330 #define PERCENTAGE_ID(name, caption) k_##name,
323 HISTOGRAM_PERCENTAGE_LIST(PERCENTAGE_ID) 331 HISTOGRAM_PERCENTAGE_LIST(PERCENTAGE_ID)
324 #undef PERCENTAGE_ID 332 #undef PERCENTAGE_ID
325 #define COUNTER_ID(name, caption) k_##name, 333 #define COUNTER_ID(name, caption) k_##name,
326 STATS_COUNTER_LIST_1(COUNTER_ID) 334 STATS_COUNTER_LIST_1(COUNTER_ID)
327 STATS_COUNTER_LIST_2(COUNTER_ID) 335 STATS_COUNTER_LIST_2(COUNTER_ID)
328 #undef COUNTER_ID 336 #undef COUNTER_ID
329 #define COUNTER_ID(name) kCountOf##name, kSizeOf##name, 337 #define COUNTER_ID(name) kCountOf##name, kSizeOf##name,
330 INSTANCE_TYPE_LIST(COUNTER_ID) 338 INSTANCE_TYPE_LIST(COUNTER_ID)
331 #undef COUNTER_ID 339 #undef COUNTER_ID
340 #define COUNTER_ID(name) kCountOfCODE_TYPE_##name, \
341 kSizeOfCODE_TYPE_##name,
342 CODE_KIND_LIST(COUNTER_ID)
343 #undef COUNTER_ID
332 #define COUNTER_ID(name) k_##name, 344 #define COUNTER_ID(name) k_##name,
333 STATE_TAG_LIST(COUNTER_ID) 345 STATE_TAG_LIST(COUNTER_ID)
334 #undef COUNTER_ID 346 #undef COUNTER_ID
335 stats_counter_count 347 stats_counter_count
336 }; 348 };
337 349
338 StatsCounter* state_counters(StateTag state) { 350 StatsCounter* state_counters(StateTag state) {
339 return &state_counters_[state]; 351 return &state_counters_[state];
340 } 352 }
341 353
(...skipping 13 matching lines...) Expand all
355 STATS_COUNTER_LIST_1(SC) 367 STATS_COUNTER_LIST_1(SC)
356 STATS_COUNTER_LIST_2(SC) 368 STATS_COUNTER_LIST_2(SC)
357 #undef SC 369 #undef SC
358 370
359 #define SC(name) \ 371 #define SC(name) \
360 StatsCounter size_of_##name##_; \ 372 StatsCounter size_of_##name##_; \
361 StatsCounter count_of_##name##_; 373 StatsCounter count_of_##name##_;
362 INSTANCE_TYPE_LIST(SC) 374 INSTANCE_TYPE_LIST(SC)
363 #undef SC 375 #undef SC
364 376
377 #define SC(name) \
378 StatsCounter size_of_CODE_TYPE_##name##_; \
379 StatsCounter count_of_CODE_TYPE_##name##_;
380 CODE_KIND_LIST(SC)
381 #undef SC
382
365 enum { 383 enum {
366 #define COUNTER_ID(name) __##name, 384 #define COUNTER_ID(name) __##name,
367 STATE_TAG_LIST(COUNTER_ID) 385 STATE_TAG_LIST(COUNTER_ID)
368 #undef COUNTER_ID 386 #undef COUNTER_ID
369 kSlidingStateWindowCounterCount 387 kSlidingStateWindowCounterCount
370 }; 388 };
371 389
372 // Sliding state window counters. 390 // Sliding state window counters.
373 StatsCounter state_counters_[kSlidingStateWindowCounterCount]; 391 StatsCounter state_counters_[kSlidingStateWindowCounterCount];
374 friend class Isolate; 392 friend class Isolate;
375 393
376 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); 394 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters);
377 }; 395 };
378 396
379 } } // namespace v8::internal 397 } } // namespace v8::internal
380 398
381 #endif // V8_V8_COUNTERS_H_ 399 #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