< prev index next >

src/hotspot/share/jfr/jni/jfrJavaCall.hpp

Print this page
rev 57095 : [mq]: use
rev 57096 : [mq]: trailing_semi


  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 
  25 #ifndef SHARE_JFR_JNI_JFRJAVACALL_HPP
  26 #define SHARE_JFR_JNI_JFRJAVACALL_HPP
  27 
  28 #include "jni.h"
  29 #include "jfr/utilities/jfrAllocation.hpp"
  30 #include "utilities/exceptions.hpp"

  31 
  32 class JavaCallArguments;
  33 class JavaThread;
  34 class JavaValue;
  35 class Klass;
  36 class Symbol;
  37 
  38 class JfrJavaArguments : public StackObj {
  39   friend class JfrJavaCall;
  40  public:
  41   JfrJavaArguments(JavaValue* result);
  42   JfrJavaArguments(JavaValue* result, const char* klass_name, const char* name, const char* signature, TRAPS);
  43   JfrJavaArguments(JavaValue* result, const Klass* klass, const Symbol* name, const Symbol* signature);
  44 
  45   Klass* klass() const;
  46   void set_klass(const char* klass_name, TRAPS);
  47   void set_klass(const Klass* klass);
  48 
  49   Symbol* name() const;
  50   void set_name(const char* name);


  69   void push_oop(Handle h_obj);
  70   void push_jobject(jobject h);
  71   void push_int(jint i);
  72   void push_double(jdouble d);
  73   void push_long(jlong l);
  74   void push_float(jfloat f);
  75 
  76   int length() const;
  77   const JavaValue& param(int idx) const;
  78 
  79  private:
  80   class Parameters {
  81     friend class JfrJavaArguments;
  82    private:
  83     enum { SIZE = 16};
  84     JavaValue _storage[SIZE];
  85     int _storage_index;
  86     int _java_stack_slots;
  87 
  88     Parameters();
  89     Parameters(const Parameters&); // no impl
  90     Parameters& operator=(const Parameters&); // no impl
  91 
  92     void push(const JavaValue& value);
  93     void push_large(const JavaValue& value);
  94 
  95     void push_oop(const oop obj);
  96     void push_oop(Handle h_obj);
  97     void push_jobject(jobject h);
  98     void push_jint(jint i);
  99     void push_jdouble(jdouble d);
 100     void push_jlong(jlong l);
 101     void push_jfloat(jfloat f);
 102 
 103     bool has_receiver() const;
 104     void set_receiver(const oop receiver);
 105     void set_receiver(Handle receiver);
 106     oop receiver() const;
 107 
 108     int length() const;
 109     int java_stack_slots() const;
 110 




  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 
  25 #ifndef SHARE_JFR_JNI_JFRJAVACALL_HPP
  26 #define SHARE_JFR_JNI_JFRJAVACALL_HPP
  27 
  28 #include "jni.h"
  29 #include "jfr/utilities/jfrAllocation.hpp"
  30 #include "utilities/exceptions.hpp"
  31 #include "utilities/macros.hpp"
  32 
  33 class JavaCallArguments;
  34 class JavaThread;
  35 class JavaValue;
  36 class Klass;
  37 class Symbol;
  38 
  39 class JfrJavaArguments : public StackObj {
  40   friend class JfrJavaCall;
  41  public:
  42   JfrJavaArguments(JavaValue* result);
  43   JfrJavaArguments(JavaValue* result, const char* klass_name, const char* name, const char* signature, TRAPS);
  44   JfrJavaArguments(JavaValue* result, const Klass* klass, const Symbol* name, const Symbol* signature);
  45 
  46   Klass* klass() const;
  47   void set_klass(const char* klass_name, TRAPS);
  48   void set_klass(const Klass* klass);
  49 
  50   Symbol* name() const;
  51   void set_name(const char* name);


  70   void push_oop(Handle h_obj);
  71   void push_jobject(jobject h);
  72   void push_int(jint i);
  73   void push_double(jdouble d);
  74   void push_long(jlong l);
  75   void push_float(jfloat f);
  76 
  77   int length() const;
  78   const JavaValue& param(int idx) const;
  79 
  80  private:
  81   class Parameters {
  82     friend class JfrJavaArguments;
  83    private:
  84     enum { SIZE = 16};
  85     JavaValue _storage[SIZE];
  86     int _storage_index;
  87     int _java_stack_slots;
  88 
  89     Parameters();
  90     NONCOPYABLE(Parameters);

  91 
  92     void push(const JavaValue& value);
  93     void push_large(const JavaValue& value);
  94 
  95     void push_oop(const oop obj);
  96     void push_oop(Handle h_obj);
  97     void push_jobject(jobject h);
  98     void push_jint(jint i);
  99     void push_jdouble(jdouble d);
 100     void push_jlong(jlong l);
 101     void push_jfloat(jfloat f);
 102 
 103     bool has_receiver() const;
 104     void set_receiver(const oop receiver);
 105     void set_receiver(Handle receiver);
 106     oop receiver() const;
 107 
 108     int length() const;
 109     int java_stack_slots() const;
 110 


< prev index next >