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

setup.h

00001 /*
00002  *                         Sun Public License Notice
00003  *
00004  * The contents of this file are subject to the Sun Public License
00005  * Version 1.0 (the "License"); you may not use this file except
00006  * in compliance with the License. A copy of the License is available
00007  * at http://www.sun.com/
00008  *
00009  * The Original Code is the Java Profiler module.  The Initial Developers
00010  * of the Original Code are Jan Stola, Pavel Vacha, Michal Pise, Petr Luner,
00011  * Lukas Petru and Marek Przeczek.
00012  *
00013  * Portions created by Jan Stola are Copyright (C) 2000-2001.
00014  * All Rights Reserved.
00015  *
00016  * Portions created by Pavel Vacha are Copyright (C) 2000-2001.
00017  * All Rights Reserved.
00018  *
00019  * Portions created by Michal Pise are Copyright (C) 2000-2001.
00020  * All Rights Reserved.
00021  *
00022  * Portions created by Petr Luner are Copyright (C) 2000-2001.
00023  * All Rights Reserved.
00024  *
00025  * Portions created by Lukas Petru are Copyright (C) 2000-2001.
00026  * All Rights Reserved.
00027  *
00028  * Portions created by Marek Przeczek are Copyright (C) 2000-2001.
00029  * All Rights Reserved.
00030  *
00031  * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner,
00032  *               Lukas Petru and Marek Przeczek.
00033  */
00034 
00035 #ifndef _SETUP_H_
00036 #define _SETUP_H_
00037 
00038 #include "../main/includes.h"
00039 #include "../string/string.h"
00040 
00047 class Setup {
00048 public:
00049 
00051         enum e {
00052 
00054                 COMMUN_PORT = 25595,
00055 
00057                 COMMUN_SHMEM_SIZE = 256*1024
00058         };
00059 
00061         enum eCommunType {
00062                 
00064                 COMMUN_SOCKET,
00065 
00067                 COMMUN_SHMEM
00068         };
00069 
00071         enum eLEVEL {
00072 
00073                 LEVEL_OBJECT,
00074                 LEVEL_METHOD,
00075                 LEVEL_TRACE
00076         };
00077 
00079         struct Alloc {
00080 
00082                 int turnedOn;
00083 
00088                 eLEVEL level;
00089 
00091                 int traceDepth;
00092 
00094                 int threadsEnabled;
00095         };
00096 
00098         struct Cpu {
00099 
00101                 int turnedOn;
00102 
00104                 int sampling;
00105 
00109                 eLEVEL level;
00110 
00112                 int traceDepth;
00113 
00115                 int threadsEnabled;
00116         };
00117 
00119         struct Mon {
00120 
00122                 int turnedOn;
00123 
00127                 eLEVEL level;
00128 
00130                 int traceDepth;
00131 
00133                 int threadsEnabled;
00134         };
00135 
00137         struct Com {
00138         
00140                 eCommunType communType;
00141 
00143                 int connectMode;
00144 
00146                 String hostname;
00147 
00149                 unsigned short port;
00150 
00152                 int shmemSize;
00153 
00155                 String shmemId;
00156 
00158                 Com() :
00159 
00160                         communType( COMMUN_SOCKET),
00161                         connectMode( 0),
00162 
00163                         hostname( "127.0.0.1"),
00164                         port( COMMUN_PORT),
00165 
00166                         shmemSize( COMMUN_SHMEM_SIZE),
00167                         shmemId( "com") // don't change, used in Java IProf, too
00168 
00169                         {}
00170         };
00171 
00172 public:
00173 
00175         Alloc alloc;
00176 
00178         Cpu cpu;
00179 
00181         Mon mon;
00182 
00184         Com com;
00185 
00186 public:
00187 
00195         Setup( char* options = NULL);
00196 
00201         void processOptions(char* options);
00202 
00203 private:
00204 
00209         void processOption(char* option);
00210 
00216         void setParameter(char* name, char* value);
00217 };
00218 
00219 #endif //_SETUP_H_

Generated on Mon Jan 28 14:53:27 2002 for Java Profiler Dynamic Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001