Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

threads.h

Go to the documentation of this file.
00001 /*
00002 Copyright (c) 2001, John Lambert jlambert@jlambert.com
00003 All rights reserved.
00004 
00005 Redistribution and use in source and binary forms, with or without modification, are 
00006 permitted provided that the following conditions are met:
00007 
00008 Redistributions of source code must retain the above copyright notice, this list of 
00009 conditions and the following disclaimer.
00010 
00011 Redistributions in binary form must reproduce the above copyright notice, this list
00012 of conditions and the following disclaimer in the documentation and/or other
00013 materials provided with the distribution. 
00014 
00015 Neither the name of the xdProf project nor the names of its contributors may be used
00016 to endorse or promote products derived from this software without specific prior 
00017 written permission. 
00018 
00019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
00020 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00021 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
00022 SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
00023 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
00024 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
00025 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
00026 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
00027 WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00028 */
00029 /*
00030 $Header: /xdprof-dll/threads.h 22    5/09/01 12:58a Admin $ 
00031  */
00032 #ifndef _THREADS_H_
00033 #define _THREADS_H_
00034 
00035 #if _MSC_VER > 1000
00036 #pragma once
00037 #endif // _MSC_VER > 1000
00038 
00039 #include "global.h"
00040 #include "types.h"
00041 
00042 void ThreadDump(const string& info, ThreadID caller);
00043 extern bool HotSpot;
00044 
00045 class ThreadInfo
00046 {
00047 private:
00048     string m_thread_name;        /* name of thread */
00049     jobjectID m_thread_id;      /* id of the thread object */
00050     JNIEnv m_thread_env_id;
00051     char m_printable[512];
00052     mutable unsigned long m_started;
00053 public:
00054     ThreadInfo() { }
00055     ThreadInfo(const ThreadInfo &);
00056     ThreadInfo(char *thread_name, char *group_name, char *parent_name, jobjectID thread_id, JNIEnv *thread_env_id);
00057     inline unsigned long getStarted() const;
00058     void setStarted(unsigned long started) const;
00059     inline const char* getShortInfo() const;
00060     inline string getThreadName() const;
00061 };
00062 
00063 class ClassInfo
00064 {
00065 private:
00066     mutable char* m_printable;
00067      char * m_class_name;
00068      char * m_source_name;
00069     jclassID m_class_id;
00070 public:
00071     ClassInfo(const ClassInfo& );
00072     ~ClassInfo();
00073     ClassInfo( char * class_name,  char * source_name, jclassID class_id);
00074     inline const char * getShortInfo() const;
00075 };
00076 
00077 class MethodInfo
00078 {
00079 private:
00080     mutable char * m_short_string;
00081     jobjectID m_class_id;
00082     jmethodID m_method_id;
00083     bool m_used;
00084     char * m_method_name;
00085     char * m_method_signature;
00086 public:
00087     MethodInfo(const MethodInfo &);
00088 
00089     ~MethodInfo();
00090 
00091     MethodInfo(
00092          char * method_name,
00093          char * method_signature,
00094         jint /* start_lineno */,
00095         jint /* end_lineno */,
00096         jmethodID method_id,
00097         jobjectID class_id);
00098     
00099     inline jobjectID getClassID() const;
00100     const char * getShortInfo() const;
00101 };
00102 
00103 #endif // _THREADS_H_
00104 

Generated at Sun Jun 24 20:57:16 2001 for xdprof by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001