src/hotspot/share/gc/z/zTracer.cpp
author pliden
Tue, 10 Sep 2019 11:11:31 +0200
changeset 58066 8407928b9fe5
parent 57603 f9d9bed12d1a
child 58154 060d9d139109
child 58704 8b16701b4636
permissions -rw-r--r--
8230566: ZGC: Don't substitute klass pointer during array clearing Reviewed-by: stefank, eosterlund
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     1
/*
53407
690aed53fef0 8217342: Build failed with excluding JFR
zgu
parents: 50749
diff changeset
     2
 * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     4
 *
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     7
 * published by the Free Software Foundation.
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     8
 *
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    13
 * accompanied this code).
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    14
 *
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    18
 *
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    21
 * questions.
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    22
 */
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    23
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    24
#include "precompiled.hpp"
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    25
#include "gc/z/zStat.hpp"
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    26
#include "gc/z/zTracer.hpp"
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    27
#include "gc/shared/gcId.hpp"
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    28
#include "gc/shared/gcLocker.hpp"
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    29
#include "jfr/jfrEvents.hpp"
53407
690aed53fef0 8217342: Build failed with excluding JFR
zgu
parents: 50749
diff changeset
    30
#include "runtime/safepoint.hpp"
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    31
#include "runtime/safepointVerifiers.hpp"
50749
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    32
#if INCLUDE_JFR
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    33
#include "jfr/metadata/jfrSerializer.hpp"
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    34
#endif
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    35
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    36
#if INCLUDE_JFR
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    37
class ZStatisticsCounterTypeConstant : public JfrSerializer {
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    38
public:
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    39
  virtual void serialize(JfrCheckpointWriter& writer) {
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    40
    writer.write_count(ZStatCounter::count());
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    41
    for (ZStatCounter* counter = ZStatCounter::first(); counter != NULL; counter = counter->next()) {
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    42
      writer.write_key(counter->id());
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    43
      writer.write(counter->name());
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    44
    }
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    45
  }
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    46
};
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    47
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    48
class ZStatisticsSamplerTypeConstant : public JfrSerializer {
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    49
public:
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    50
  virtual void serialize(JfrCheckpointWriter& writer) {
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    51
    writer.write_count(ZStatSampler::count());
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    52
    for (ZStatSampler* sampler = ZStatSampler::first(); sampler != NULL; sampler = sampler->next()) {
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    53
      writer.write_key(sampler->id());
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    54
      writer.write(sampler->name());
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    55
    }
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    56
  }
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    57
};
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    58
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    59
static void register_jfr_type_serializers() {
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    60
  JfrSerializer::register_serializer(TYPE_ZSTATISTICSCOUNTERTYPE,
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    61
                                     false /* require_safepoint */,
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    62
                                     true /* permit_cache */,
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    63
                                     new ZStatisticsCounterTypeConstant());
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    64
  JfrSerializer::register_serializer(TYPE_ZSTATISTICSSAMPLERTYPE,
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    65
                                     false /* require_safepoint */,
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    66
                                     true /* permit_cache */,
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    67
                                     new ZStatisticsSamplerTypeConstant());
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    68
}
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    69
#endif
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    70
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    71
ZTracer* ZTracer::_tracer = NULL;
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    72
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    73
ZTracer::ZTracer() :
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    74
    GCTracer(Z) {}
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    75
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    76
void ZTracer::initialize() {
50749
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    77
  assert(_tracer == NULL, "Already initialized");
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    78
  _tracer = new (ResourceObj::C_HEAP, mtGC) ZTracer();
50749
41a5b2de5ad3 8205405: ZGC: Decouple JFR type registration
pliden
parents: 50525
diff changeset
    79
  JFR_ONLY(register_jfr_type_serializers());
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    80
}
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    81
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    82
void ZTracer::send_stat_counter(uint32_t counter_id, uint64_t increment, uint64_t value) {
57603
f9d9bed12d1a 8228630: Remove always true parameter to NoSafepointVerifier
coleenp
parents: 53407
diff changeset
    83
  NoSafepointVerifier nsv;
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    84
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    85
  EventZStatisticsCounter e;
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    86
  if (e.should_commit()) {
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    87
    e.set_id(counter_id);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    88
    e.set_increment(increment);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    89
    e.set_value(value);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    90
    e.commit();
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    91
  }
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    92
}
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    93
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    94
void ZTracer::send_stat_sampler(uint32_t sampler_id, uint64_t value) {
57603
f9d9bed12d1a 8228630: Remove always true parameter to NoSafepointVerifier
coleenp
parents: 53407
diff changeset
    95
  NoSafepointVerifier nsv;
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    96
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    97
  EventZStatisticsSampler e;
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    98
  if (e.should_commit()) {
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
    99
    e.set_id(sampler_id);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   100
    e.set_value(value);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   101
    e.commit();
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   102
  }
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   103
}
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   104
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   105
void ZTracer::send_thread_phase(const char* name, const Ticks& start, const Ticks& end) {
57603
f9d9bed12d1a 8228630: Remove always true parameter to NoSafepointVerifier
coleenp
parents: 53407
diff changeset
   106
  NoSafepointVerifier nsv;
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   107
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   108
  EventZThreadPhase e(UNTIMED);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   109
  if (e.should_commit()) {
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   110
    e.set_gcId(GCId::current_or_undefined());
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   111
    e.set_name(name);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   112
    e.set_starttime(start);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   113
    e.set_endtime(end);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   114
    e.commit();
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   115
  }
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   116
}
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   117
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   118
void ZTracer::send_page_alloc(size_t size, size_t used, size_t free, size_t cache, bool nonblocking, bool noreserve) {
57603
f9d9bed12d1a 8228630: Remove always true parameter to NoSafepointVerifier
coleenp
parents: 53407
diff changeset
   119
  NoSafepointVerifier nsv;
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   120
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   121
  EventZPageAllocation e;
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   122
  if (e.should_commit()) {
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   123
    e.set_pageSize(size);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   124
    e.set_usedAfter(used);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   125
    e.set_freeAfter(free);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   126
    e.set_inCacheAfter(cache);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   127
    e.set_nonBlocking(nonblocking);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   128
    e.set_noReserve(noreserve);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   129
    e.commit();
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   130
  }
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   131
}
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   132
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   133
void ZTracer::report_stat_counter(const ZStatCounter& counter, uint64_t increment, uint64_t value) {
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   134
  send_stat_counter(counter.id(), increment, value);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   135
}
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   136
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   137
void ZTracer::report_stat_sampler(const ZStatSampler& sampler, uint64_t value) {
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   138
  send_stat_sampler(sampler.id(), value);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   139
}
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   140
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   141
void ZTracer::report_thread_phase(const ZStatPhase& phase, const Ticks& start, const Ticks& end) {
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   142
  send_thread_phase(phase.name(), start, end);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   143
}
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   144
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   145
void ZTracer::report_thread_phase(const char* name, const Ticks& start, const Ticks& end) {
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   146
  send_thread_phase(name, start, end);
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   147
}
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   148
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   149
void ZTracer::report_page_alloc(size_t size, size_t used, size_t free, size_t cache, ZAllocationFlags flags) {
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   150
  send_page_alloc(size, used, free, cache, flags.non_blocking(), flags.no_reserve());
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents:
diff changeset
   151
}