Mercurial > hg > truffle
comparison src/share/vm/runtime/perfData.hpp @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | 63a4eb8bcd23 |
children | 89152779163c |
comparison
equal
deleted
inserted
replaced
14908:8db6e76cb658 | 14909:4ca6dc0799b6 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
114 * | 114 * |
115 * The String type is derived from the ByteArray type. | 115 * The String type is derived from the ByteArray type. |
116 * | 116 * |
117 * A PerfData subtype is not required to provide an implementation for | 117 * A PerfData subtype is not required to provide an implementation for |
118 * each variability classification. For example, the String type provides | 118 * each variability classification. For example, the String type provides |
119 * Variable and Constant variability classifications in the PerfStringVariable | 119 * Variable and Constant variablility classifications in the PerfStringVariable |
120 * and PerfStringConstant classes, but does not provide a counter type. | 120 * and PerfStringConstant classes, but does not provide a counter type. |
121 * | 121 * |
122 * Performance data are also described by a unit of measure. Units allow | 122 * Performance data are also described by a unit of measure. Units allow |
123 * client applications to make reasonable decisions on how to treat | 123 * client applications to make reasonable decisions on how to treat |
124 * performance data generically, preventing the need to hard-code the | 124 * performance data generically, preventing the need to hard-code the |
170 * optionalInitialValue, | 170 * optionalInitialValue, |
171 * CHECK); | 171 * CHECK); |
172 * foo_counter->inc(); | 172 * foo_counter->inc(); |
173 * | 173 * |
174 * Creating a performance counter that holds a variably change long | 174 * Creating a performance counter that holds a variably change long |
175 * data value with units specified in U_Bytes in the "com.sun.ci | 175 * data value with untis specified in U_Bytes in the "com.sun.ci |
176 * name space. | 176 * name space. |
177 * | 177 * |
178 * PerfLongVariable* bar_variable; | 178 * PerfLongVariable* bar_varible; |
179 * bar_variable = PerfDataManager::create_long_variable(COM_CI, "bar", | 179 * bar_variable = PerfDataManager::create_long_variable(COM_CI, "bar", |
180 .* PerfData::U_Bytes, | 180 .* PerfData::U_Bytes, |
181 * optionalInitialValue, | 181 * optionalInitialValue, |
182 * CHECK); | 182 * CHECK); |
183 * | 183 * |
201 * &my_jlong, CHECK); | 201 * &my_jlong, CHECK); |
202 * | 202 * |
203 * In this example, the PerfData pointer can be ignored as the caller | 203 * In this example, the PerfData pointer can be ignored as the caller |
204 * is relying on the StatSampler PeriodicTask to sample the given | 204 * is relying on the StatSampler PeriodicTask to sample the given |
205 * address at a regular interval. The interval is defined by the | 205 * address at a regular interval. The interval is defined by the |
206 * PerfDataSamplingInterval global variable, and is applied on | 206 * PerfDataSamplingInterval global variable, and is applyied on |
207 * a system wide basis, not on an per-counter basis. | 207 * a system wide basis, not on an per-counter basis. |
208 * | 208 * |
209 * Creating a performance counter in an arbitrary name space that utilizes | 209 * Creating a performance counter in an arbitrary name space that utilizes |
210 * a helper object to return a value to the StatSampler via the take_sample() | 210 * a helper object to return a value to the StatSampler via the take_sample() |
211 * method. | 211 * method. |
232 * | 232 * |
233 * Always-on non-sampled counters can be created independent of | 233 * Always-on non-sampled counters can be created independent of |
234 * the UsePerfData flag. Counters will be created on the c-heap | 234 * the UsePerfData flag. Counters will be created on the c-heap |
235 * if UsePerfData is false. | 235 * if UsePerfData is false. |
236 * | 236 * |
237 * Until further notice, all PerfData objects should be created and | 237 * Until further noice, all PerfData objects should be created and |
238 * manipulated within a guarded block. The guard variable is | 238 * manipulated within a guarded block. The guard variable is |
239 * UsePerfData, a product flag set to true by default. This flag may | 239 * UsePerfData, a product flag set to true by default. This flag may |
240 * be removed from the product in the future. | 240 * be removed from the product in the future. |
241 * | 241 * |
242 */ | 242 */ |
584 * from Java code where a test for existence is implemented as a | 584 * from Java code where a test for existence is implemented as a |
585 * search over all existing PerfData items. | 585 * search over all existing PerfData items. |
586 * | 586 * |
587 * The abstraction is not complete. A more general container class | 587 * The abstraction is not complete. A more general container class |
588 * would provide an Iterator abstraction that could be used to | 588 * would provide an Iterator abstraction that could be used to |
589 * traverse the lists. This implementation still relies upon integer | 589 * traverse the lists. This implementation still relys upon integer |
590 * iterators and the at(int index) method. However, the GrowableArray | 590 * iterators and the at(int index) method. However, the GrowableArray |
591 * is not directly visible outside this class and can be replaced by | 591 * is not directly visible outside this class and can be replaced by |
592 * some other implementation, as long as that implementation provides | 592 * some other implementation, as long as that implementation provides |
593 * a mechanism to iterate over the container by index. | 593 * a mechanism to iterate over the container by index. |
594 */ | 594 */ |