Hi.

Yesterday and today I was playing with standard Java debuger jdb.
It may be not very pretty, but it can be REALLY useful.
If you are wondering what all the 150 threads of your Tomcat are doing
or why your screen/layout/whatever is not being called you can
really use jdb.

The problem is that debgger isn't much willing to cooperate :-). At 
least on my Linux server jdb from jdk1.3.0-rc1 from Sun hangs at the attempt
to launch JDB (I suspect that there is a bug in debuger/jvm handshake)
the debugger from jdk1.2.2 fails to start, it claims that a .so is
missing, while obviously is not, and jdk1.3.0 from IBM crashes with
signal 6 (I found IBM jdk 1.3 to be notorius for different interestnig 'crash
scenarios').

So far I managed to debug Turbnie within a running Tomcat instance on my
Windows NT workstation (jdk 1.3-b07 from Sun)
an example session:

c:\progra~1\jdk1.3.0\bin\jdb -classpath 
lib\webserver.jar;lib\servlet.jar;lib\jaxp.jar;lib\parser.jar;c:\progra~1\jdk1.3.0\lib\tools.jar
 -Dtomcat.home=. org.apache.tomcat.startup.Tomcat
> run
> use f:\work\turbine\src\java
> stop in org.apache.turbine.Turbnie.doGet
Deferring breakpoint org.apache.turbine.Turbnie.doGet.
It will be set after the class is loaded.
> stop in org.apache.turbine.Turbine.doGet
Set breakpoint org.apache.turbine.Turbine.doGet
>
Breakpoint hit:
Breakpoint hit: thread="Thread-8", org.apache.turbine.Turbine.doGet(), line=207, bci=0
  207         RunData data = null;

Thread-8[1] list
203                throws IOException,
204                       ServletException
205            {
206                // Placeholder for the RunData object.
207     =>         RunData data = null;
208                try
209                {
210                    // Check to make sure that we started up properly.
211                    if (initFailureMessage != null)
212                    {
Thread-8[1] print 
getServletContext().getAttribute("javax.servlet.context.tempdir").getPath()
 getServletContext().getAttribute("javax.servlet.context.tempdir").getPath() = 
"F:\tomcat\work\localhost_8080%2Fturbine"
Thread-8[1]

As you the debuger is REALLY powerful... I'm looking forward to using it in the future!

OK. Now I have a question: Where can I find tools for profiling Java? Maybe something 
is included in the JDK?
I want to let JMeter throw some traffic at my application and see what is eating the 
ticks.
Have someone profiled Turbine+WebMacro yet? Where are the bottlenecks?

Rafal


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to