Freeze up on sample? [message #121122] |
Mon, 21 January 2008 09:36 |
Eclipse User |
|
|
|
Originally posted by: ck2329.mail.ru
Im running Eclipse 3.3 with TPTP 4.4.1 on Win32 (TPTPAllInOne package) ,
Pentium IV with HT, 3.0 MGhz, 2 GB RAM
And im facing with following trouble:
When im running my example - TPTP works just for 1 min(that is longest run
- ussually it works less) - then it freezes. What can be wrong ?
Example code:
class Q {
int n;
boolean valueset = false;
synchronized int get() {
if (!valueset)
try {
wait();
}
catch (InterruptedException e) {
System.out.println("InterruptedException caught");
}
System.out.println("Got: " + n);
valueset=false;
notify();
return n;
}
synchronized void put(int n) {
if (valueset)
try {
wait();
}
catch(InterruptedException e) {
System.out.println("InterruptedException caught");
}
this.n=n;
valueset=true;
System.out.println("Put: " + n);
notify();
}
}
class Producer implements Runnable {
Q q;
Producer(Q q) {
this.q=q;
new Thread(this, "Producer").start();
}
public void run() {
int i=0;
while(true) {
q.put(i++);
}
}
}
class Consumer implements Runnable {
Q q;
Consumer(Q q) {
this.q=q;
new Thread(this, "Consumer").start();
}
public void run() {
while(true) {
q.get();
}
}
}
class PCFixed {
public static void main(String args[]) {
Q q = new Q();
new Producer(q);
new Consumer(q);
System.out.println("Press Control-C to stop");
}
}
|
|
|
|
Re: Freeze up on sample? [message #121185 is a reply to message #121166] |
Tue, 22 January 2008 09:37 |
Eclipse User |
|
|
|
Originally posted by: ck2329.mail.ru
Actually it happends on all types of analysis.
Now i tried with Thread Analysis. I have 72146 events and ~36MB processed
data in 49 secs - than i got hand up.
regading filters - i dont know how to specify filter for Thread Analysis
|
|
|
Powered by
FUDForum. Page generated in 0.02837 seconds