18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 #ifndef SHARE_GC_Z_ZSTAT_HPP
25 #define SHARE_GC_Z_ZSTAT_HPP
26
27 #include "gc/shared/concurrentGCThread.hpp"
28 #include "gc/shared/gcCause.hpp"
29 #include "gc/shared/gcTimer.hpp"
30 #include "gc/z/zMetronome.hpp"
31 #include "logging/logHandle.hpp"
32 #include "memory/allocation.hpp"
33 #include "utilities/globalDefinitions.hpp"
34 #include "utilities/numberSeq.hpp"
35 #include "utilities/ticks.hpp"
36
37 class ZPage;
38 class ZStatSampler;
39 class ZStatSamplerHistory;
40 struct ZStatCounterData;
41 struct ZStatSamplerData;
42
43 //
44 // Stat unit printers
45 //
46 typedef void (*ZStatUnitPrinter)(LogTargetHandle log, const ZStatSampler&, const ZStatSamplerHistory&);
47
48 void ZStatUnitTime(LogTargetHandle log, const ZStatSampler& sampler, const ZStatSamplerHistory& history);
49 void ZStatUnitBytes(LogTargetHandle log, const ZStatSampler& sampler, const ZStatSamplerHistory& history);
50 void ZStatUnitThreads(LogTargetHandle log, const ZStatSampler& sampler, const ZStatSamplerHistory& history);
51 void ZStatUnitBytesPerSecond(LogTargetHandle log, const ZStatSampler& sampler, const ZStatSamplerHistory& history);
52 void ZStatUnitOpsPerSecond(LogTargetHandle log, const ZStatSampler& sampler, const ZStatSamplerHistory& history);
53
54 //
55 // Stat value
56 //
57 class ZStatValue {
401 static size_t _nproactiveflush;
402 static size_t _nterminateflush;
403 static size_t _ntrycomplete;
404 static size_t _ncontinue;
405
406 public:
407 static void set_at_mark_start(size_t nstripes);
408 static void set_at_mark_end(size_t nproactiveflush,
409 size_t nterminateflush,
410 size_t ntrycomplete,
411 size_t ncontinue);
412
413 static void print();
414 };
415
416 //
417 // Stat relocation
418 //
419 class ZStatRelocation : public AllStatic {
420 private:
421 static size_t _relocating;
422 static bool _success;
423
424 public:
425 static void set_at_select_relocation_set(size_t relocating);
426 static void set_at_relocate_end(bool success);
427
428 static void print();
429 };
430
431 //
432 // Stat nmethods
433 //
434 class ZStatNMethods : public AllStatic {
435 public:
436 static void print();
437 };
438
439 //
440 // Stat metaspace
441 //
442 class ZStatMetaspace : public AllStatic {
443 public:
444 static void print();
445 };
523 size_t free_high;
524 size_t free_low;
525 } _at_relocate_end;
526
527 static size_t capacity_high();
528 static size_t capacity_low();
529 static size_t available(size_t used);
530 static size_t reserve(size_t used);
531 static size_t free(size_t used);
532
533 public:
534 static void set_at_initialize(size_t min_capacity,
535 size_t max_capacity,
536 size_t max_reserve);
537 static void set_at_mark_start(size_t soft_max_capacity,
538 size_t capacity,
539 size_t used);
540 static void set_at_mark_end(size_t capacity,
541 size_t allocated,
542 size_t used);
543 static void set_at_select_relocation_set(size_t live,
544 size_t garbage,
545 size_t reclaimed);
546 static void set_at_relocate_start(size_t capacity,
547 size_t allocated,
548 size_t used);
549 static void set_at_relocate_end(size_t capacity,
550 size_t allocated,
551 size_t reclaimed,
552 size_t used,
553 size_t used_high,
554 size_t used_low);
555
556 static size_t max_capacity();
557 static size_t used_at_mark_start();
558 static size_t used_at_relocate_end();
559
560 static void print();
561 };
562
563 #endif // SHARE_GC_Z_ZSTAT_HPP
|
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 #ifndef SHARE_GC_Z_ZSTAT_HPP
25 #define SHARE_GC_Z_ZSTAT_HPP
26
27 #include "gc/shared/concurrentGCThread.hpp"
28 #include "gc/shared/gcCause.hpp"
29 #include "gc/shared/gcTimer.hpp"
30 #include "gc/z/zMetronome.hpp"
31 #include "logging/logHandle.hpp"
32 #include "memory/allocation.hpp"
33 #include "utilities/globalDefinitions.hpp"
34 #include "utilities/numberSeq.hpp"
35 #include "utilities/ticks.hpp"
36
37 class ZPage;
38 class ZRelocationSetSelectorGroupStats;
39 class ZStatSampler;
40 class ZStatSamplerHistory;
41 struct ZStatCounterData;
42 struct ZStatSamplerData;
43
44 //
45 // Stat unit printers
46 //
47 typedef void (*ZStatUnitPrinter)(LogTargetHandle log, const ZStatSampler&, const ZStatSamplerHistory&);
48
49 void ZStatUnitTime(LogTargetHandle log, const ZStatSampler& sampler, const ZStatSamplerHistory& history);
50 void ZStatUnitBytes(LogTargetHandle log, const ZStatSampler& sampler, const ZStatSamplerHistory& history);
51 void ZStatUnitThreads(LogTargetHandle log, const ZStatSampler& sampler, const ZStatSamplerHistory& history);
52 void ZStatUnitBytesPerSecond(LogTargetHandle log, const ZStatSampler& sampler, const ZStatSamplerHistory& history);
53 void ZStatUnitOpsPerSecond(LogTargetHandle log, const ZStatSampler& sampler, const ZStatSamplerHistory& history);
54
55 //
56 // Stat value
57 //
58 class ZStatValue {
402 static size_t _nproactiveflush;
403 static size_t _nterminateflush;
404 static size_t _ntrycomplete;
405 static size_t _ncontinue;
406
407 public:
408 static void set_at_mark_start(size_t nstripes);
409 static void set_at_mark_end(size_t nproactiveflush,
410 size_t nterminateflush,
411 size_t ntrycomplete,
412 size_t ncontinue);
413
414 static void print();
415 };
416
417 //
418 // Stat relocation
419 //
420 class ZStatRelocation : public AllStatic {
421 private:
422 struct Group {
423 size_t _npages;
424 size_t _total;
425 size_t _empty;
426 size_t _compacting_from;
427 size_t _compacting_to;
428 };
429
430 static Group _small;
431 static Group _medium;
432 static Group _large;
433 static bool _success;
434
435 static void print(const char* name, const ZStatRelocation::Group& group);
436
437 public:
438 static void set_at_select_relocation_set(const ZRelocationSetSelectorGroupStats& small,
439 const ZRelocationSetSelectorGroupStats& medium,
440 const ZRelocationSetSelectorGroupStats& large);
441 static void set_at_relocate_end(bool success);
442
443 static void print();
444 };
445
446 //
447 // Stat nmethods
448 //
449 class ZStatNMethods : public AllStatic {
450 public:
451 static void print();
452 };
453
454 //
455 // Stat metaspace
456 //
457 class ZStatMetaspace : public AllStatic {
458 public:
459 static void print();
460 };
538 size_t free_high;
539 size_t free_low;
540 } _at_relocate_end;
541
542 static size_t capacity_high();
543 static size_t capacity_low();
544 static size_t available(size_t used);
545 static size_t reserve(size_t used);
546 static size_t free(size_t used);
547
548 public:
549 static void set_at_initialize(size_t min_capacity,
550 size_t max_capacity,
551 size_t max_reserve);
552 static void set_at_mark_start(size_t soft_max_capacity,
553 size_t capacity,
554 size_t used);
555 static void set_at_mark_end(size_t capacity,
556 size_t allocated,
557 size_t used);
558 static void set_at_select_relocation_set(const ZRelocationSetSelectorGroupStats& small,
559 const ZRelocationSetSelectorGroupStats& medium,
560 const ZRelocationSetSelectorGroupStats& large,
561 size_t reclaimed);
562 static void set_at_relocate_start(size_t capacity,
563 size_t allocated,
564 size_t used);
565 static void set_at_relocate_end(size_t capacity,
566 size_t allocated,
567 size_t reclaimed,
568 size_t used,
569 size_t used_high,
570 size_t used_low);
571
572 static size_t max_capacity();
573 static size_t used_at_mark_start();
574 static size_t used_at_relocate_end();
575
576 static void print();
577 };
578
579 #endif // SHARE_GC_Z_ZSTAT_HPP
|