author | mgronlun |
Mon, 25 Nov 2019 18:38:01 +0100 | |
changeset 59259 | 127ca611f19b |
parent 53244 | 9807daeb47c4 |
permissions | -rw-r--r-- |
50113 | 1 |
/* |
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
50873
diff
changeset
|
2 |
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. |
50113 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
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 |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
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 |
||
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
50873
diff
changeset
|
25 |
#ifndef SHARE_JFR_RECORDER_SERVICE_JFROPTIONSET_HPP |
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
50873
diff
changeset
|
26 |
#define SHARE_JFR_RECORDER_SERVICE_JFROPTIONSET_HPP |
50113 | 27 |
|
28 |
#include "jni.h" |
|
29 |
#include "memory/allocation.hpp" |
|
30 |
#include "utilities/exceptions.hpp" |
|
31 |
||
50664
857ce291c70c
8204571: Add support for launching multiple startup recordings
mgronlun
parents:
50113
diff
changeset
|
32 |
template <typename> |
857ce291c70c
8204571: Add support for launching multiple startup recordings
mgronlun
parents:
50113
diff
changeset
|
33 |
class GrowableArray; |
857ce291c70c
8204571: Add support for launching multiple startup recordings
mgronlun
parents:
50113
diff
changeset
|
34 |
|
50113 | 35 |
// |
36 |
// Command-line options and defaults |
|
37 |
// |
|
38 |
class JfrOptionSet : public AllStatic { |
|
39 |
friend class JfrRecorder; |
|
40 |
private: |
|
41 |
static jlong _max_chunk_size; |
|
42 |
static jlong _global_buffer_size; |
|
43 |
static jlong _thread_buffer_size; |
|
44 |
static jlong _memory_size; |
|
45 |
static jlong _num_global_buffers; |
|
46 |
static jlong _old_object_queue_size; |
|
47 |
static u4 _stack_depth; |
|
48 |
static jboolean _sample_threads; |
|
49 |
static jboolean _retransform; |
|
50 |
static jboolean _sample_protection; |
|
51 |
||
52 |
static bool initialize(Thread* thread); |
|
53 |
static bool configure(TRAPS); |
|
54 |
static bool adjust_memory_options(); |
|
55 |
||
56 |
public: |
|
57 |
static jlong max_chunk_size(); |
|
58 |
static void set_max_chunk_size(jlong value); |
|
59 |
static jlong global_buffer_size(); |
|
60 |
static void set_global_buffer_size(jlong value); |
|
61 |
static jlong thread_buffer_size(); |
|
62 |
static void set_thread_buffer_size(jlong value); |
|
63 |
static jlong memory_size(); |
|
64 |
static void set_memory_size(jlong value); |
|
65 |
static jlong num_global_buffers(); |
|
66 |
static void set_num_global_buffers(jlong value); |
|
67 |
static jint old_object_queue_size(); |
|
68 |
static void set_old_object_queue_size(jlong value); |
|
69 |
static u4 stackdepth(); |
|
70 |
static void set_stackdepth(u4 depth); |
|
71 |
static bool sample_threads(); |
|
72 |
static void set_sample_threads(jboolean sample); |
|
73 |
static bool can_retransform(); |
|
74 |
static void set_retransform(jboolean value); |
|
75 |
static bool compressed_integers(); |
|
76 |
static bool allow_retransforms(); |
|
77 |
static bool allow_event_retransforms(); |
|
78 |
static bool sample_protection(); |
|
79 |
DEBUG_ONLY(static void set_sample_protection(jboolean protection);) |
|
80 |
||
50873
ce53844224b6
8205906: jdk.jfr.jcmd.TestJcmdDumpLimited fails due to erronous processing of -XX:FlightRecorderOptions
mgronlun
parents:
50664
diff
changeset
|
81 |
static bool parse_flight_recorder_option(const JavaVMOption** option, char* delimiter); |
ce53844224b6
8205906: jdk.jfr.jcmd.TestJcmdDumpLimited fails due to erronous processing of -XX:FlightRecorderOptions
mgronlun
parents:
50664
diff
changeset
|
82 |
static bool parse_start_flight_recording_option(const JavaVMOption** option, char* delimiter); |
59259
127ca611f19b
8233197: Invert JvmtiExport::post_vm_initialized() and Jfr:on_vm_start() start-up order for correct option parsing
mgronlun
parents:
53244
diff
changeset
|
83 |
static const GrowableArray<const char*>* start_flight_recording_options(); |
127ca611f19b
8233197: Invert JvmtiExport::post_vm_initialized() and Jfr:on_vm_start() start-up order for correct option parsing
mgronlun
parents:
53244
diff
changeset
|
84 |
static void release_start_flight_recording_options(); |
50113 | 85 |
}; |
86 |
||
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
50873
diff
changeset
|
87 |
#endif // SHARE_JFR_RECORDER_SERVICE_JFROPTIONSET_HPP |