public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* 100%CPU when using ScheduledThreadPoolExecutor only with GCJ
@ 2010-04-30 17:45 Lon Palmer
  2010-04-30 17:49 ` Andrew Haley
  0 siblings, 1 reply; 2+ messages in thread
From: Lon Palmer @ 2010-04-30 17:45 UTC (permalink / raw)
  To: Jaga GCC Mail LIst

GCJ 4.3

I have an application that makes use of several instances of ScheduledThreadPoolExecutor.  

When running as a Jar, this application uses very little CPU.  However, when running as a Linux compile (using gcj-4.3) classes using the ScheduledThreadPoolExecutor can use 100% CPU under no load.

I've only found one situation that will reliably cause the cpu spike in my application.

Class A has a private member which is a ScheduledThreadPoolExecutor.
Class A assigns one task to it's S.T.P.E (15 ms rate).
Class A has a private member Class B.
Class B has a private member which is a ScheduledThreadPoolExecutor.
Class B assigns one task to it's S.T.P.E. (60 ms rate).

When class A is instantiated in my application, the CPU usage jumps to 100%.  If I make class B reference the same S.T.P.E as is used in class A, the CPU usage doesn't seem to jump.

However, there are other places in my code in which classes want to use a S.T.P.E and I'm seeing CPU spikes to 100% that I'm not getting in the Jar.

Any help is appreciated.  I did a search in the Bugzilla DB for ScheduledThreadPoolExecutor and didn't find any entries.  

If this sounds like a bug instead of a mis-use of the class please let me know and I'll try to write a demonstration app this weekend.

Thanks!

Lon Palmer


      

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 100%CPU when using ScheduledThreadPoolExecutor only with GCJ
  2010-04-30 17:45 100%CPU when using ScheduledThreadPoolExecutor only with GCJ Lon Palmer
@ 2010-04-30 17:49 ` Andrew Haley
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Haley @ 2010-04-30 17:49 UTC (permalink / raw)
  To: java

On 04/30/2010 06:45 PM, Lon Palmer wrote:
> GCJ 4.3
> 
> I have an application that makes use of several instances of ScheduledThreadPoolExecutor.  
> 
> When running as a Jar, this application uses very little CPU.  However, when running as a Linux compile (using gcj-4.3) classes using the ScheduledThreadPoolExecutor can use 100% CPU under no load.
> 
> I've only found one situation that will reliably cause the cpu spike in my application.
> 
> Class A has a private member which is a ScheduledThreadPoolExecutor.
> Class A assigns one task to it's S.T.P.E (15 ms rate).
> Class A has a private member Class B.
> Class B has a private member which is a ScheduledThreadPoolExecutor.
> Class B assigns one task to it's S.T.P.E. (60 ms rate).
> 
> When class A is instantiated in my application, the CPU usage jumps to 100%.  If I make class B reference the same S.T.P.E as is used in class A, the CPU usage doesn't seem to jump.
> 
> However, there are other places in my code in which classes want to use a S.T.P.E and I'm seeing CPU spikes to 100% that I'm not getting in the Jar.
> 
> Any help is appreciated.  I did a search in the Bugzilla DB for ScheduledThreadPoolExecutor and didn't find any entries.  
> 
> If this sounds like a bug instead of a mis-use of the class please let me know and I'll try to write a demonstration app this weekend.

Sounds like a bug to me.  Either way, we need a test case to demonstrate it.

Andrew.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-30 17:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-30 17:45 100%CPU when using ScheduledThreadPoolExecutor only with GCJ Lon Palmer
2010-04-30 17:49 ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).