< prev index next >

src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp

Print this page


   1 /*
   2  * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
   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  *


  88 
  89 jlong JfrOptionSet::num_global_buffers() {
  90   return _num_global_buffers;
  91 }
  92 
  93 void JfrOptionSet::set_num_global_buffers(jlong value) {
  94   _num_global_buffers = value;
  95 }
  96 
  97 jint JfrOptionSet::old_object_queue_size() {
  98   return (jint)_old_object_queue_size;
  99 }
 100 
 101 void JfrOptionSet::set_old_object_queue_size(jlong value) {
 102   _old_object_queue_size = value;
 103 }
 104 
 105 u4 JfrOptionSet::stackdepth() {
 106   return _stack_depth;
 107 }
 108 
 109 static const u4 STACK_DEPTH_DEFAULT = 64;
 110 static const u4 MIN_STACK_DEPTH = 1;
 111 static const u4 MAX_STACK_DEPTH = 2048;
 112 
 113 void JfrOptionSet::set_stackdepth(u4 depth) {
 114   if (depth < MIN_STACK_DEPTH) {
 115     _stack_depth = MIN_STACK_DEPTH;
 116   } else if (depth > MAX_STACK_DEPTH) {
 117     _stack_depth = MAX_STACK_DEPTH;
 118   } else {
 119     _stack_depth = depth;
 120   }
 121 }
 122 
 123 bool JfrOptionSet::sample_threads() {
 124   return _sample_threads == JNI_TRUE;
 125 }
 126 
 127 void JfrOptionSet::set_sample_threads(jboolean sample) {
 128   _sample_threads = sample;
 129 }
 130 
 131 bool JfrOptionSet::can_retransform() {


   1 /*
   2  * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
   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  *


  88 
  89 jlong JfrOptionSet::num_global_buffers() {
  90   return _num_global_buffers;
  91 }
  92 
  93 void JfrOptionSet::set_num_global_buffers(jlong value) {
  94   _num_global_buffers = value;
  95 }
  96 
  97 jint JfrOptionSet::old_object_queue_size() {
  98   return (jint)_old_object_queue_size;
  99 }
 100 
 101 void JfrOptionSet::set_old_object_queue_size(jlong value) {
 102   _old_object_queue_size = value;
 103 }
 104 
 105 u4 JfrOptionSet::stackdepth() {
 106   return _stack_depth;
 107 }




 108 
 109 void JfrOptionSet::set_stackdepth(u4 depth) {
 110   if (depth < MIN_STACK_DEPTH) {
 111     _stack_depth = MIN_STACK_DEPTH;
 112   } else if (depth > MAX_STACK_DEPTH) {
 113     _stack_depth = MAX_STACK_DEPTH;
 114   } else {
 115     _stack_depth = depth;
 116   }
 117 }
 118 
 119 bool JfrOptionSet::sample_threads() {
 120   return _sample_threads == JNI_TRUE;
 121 }
 122 
 123 void JfrOptionSet::set_sample_threads(jboolean sample) {
 124   _sample_threads = sample;
 125 }
 126 
 127 bool JfrOptionSet::can_retransform() {


< prev index next >