Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   "Java Performance Tuning Book" anyone read this book? (http://www.velocityreviews.com/forums/t372954-java-performance-tuning-book-anyone-read-this-book.html)

coltrane 09-25-2006 08:25 PM

"Java Performance Tuning Book" anyone read this book?
 
I am looking for someone who has run some of the examples in this book.
I cannot get one of the first projects to work. I keep gettting a stack
error running the ObjectCreationMonitoring example. I ( and others )
believe there is a recursion problem. The modification to the Object
class seems a little suspect. Also, changing the stack size did not
help.

thanks for your help

john


Tris Orendorff 09-26-2006 07:37 PM

Re: "Java Performance Tuning Book" anyone read this book?
 
"coltrane" <tendengarci@yahoo.com> burped up warm pablum in
news:1159215954.521030.276110@m7g2000cwm.googlegro ups.com:

> I am looking for someone who has run some of the examples in this book.
> I cannot get one of the first projects to work. I keep gettting a stack
> error running the ObjectCreationMonitoring example. I ( and others )
> believe there is a recursion problem. The modification to the Object
> class seems a little suspect. Also, changing the stack size did not
> help.


Sorry, I haven't read the book but if you post a small example someone
will comment on it.

--
Sincerely,

Tris Orendorff
[Q: What kind of modem did Jimi Hendrix use?
A: A purple Hayes.]



coltrane 09-27-2006 01:13 PM

Re: "Java Performance Tuning Book" anyone read this book?
 

Tris Orendorff wrote:
> "coltrane" <tendengarci@yahoo.com> burped up warm pablum in
> news:1159215954.521030.276110@m7g2000cwm.googlegro ups.com:
>
> > I am looking for someone who has run some of the examples in this book.
> > I cannot get one of the first projects to work. I keep gettting a stack
> > error running the ObjectCreationMonitoring example. I ( and others )
> > believe there is a recursion problem. The modification to the Object
> > class seems a little suspect. Also, changing the stack size did not
> > help.

>
> Sorry, I haven't read the book but if you post a small example someone
> will comment on it.
>
> --
> Sincerely,
>
> Tris Orendorff
> [Q: What kind of modem did Jimi Hendrix use?
> A: A purple Hayes.]


Thanks for the response,

Originally I was trying to get an object monitor to work. This required
modifying the java.lang.Object class. When I ran this I received a
stack error. So to test where the error occured I removed the
monitoring app and replaced it with a simple hello world. Using the new
Object I still recieved the stack error. Again to remove any reference
to the monitoring code I removed the one line of code used for the
Object Monitor. I replaced it with a System.out.println(...). I still
received the error. So after all that, this is the additonal code I
added to the Object class

>>

public Object(){
this(true);
System.out.println("java.lang.Object");
}
public Object(boolean b)
{
}
>>


What I have found is that if I do not use a class, something derived
from Object, there is no problem. In other words, If I use:

int x;
x = 1 + 2

there is no error. But if I use

Integer x = 2;

Boom! StackError.

One last thing, I am invoking the app with the following command line

java -Xbootclasspath/p:ObjectHack.jar;rt.jar tuning.HelloWorld

(the java.lang.Object class is obviously in ObjectHack.jar)

So that the deal.

thanks again



All times are GMT. The time now is 10:06 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.