开发者

Eclipse uses lots of CPU recently, how can I debug this?

开发者 https://www.devze.com 2023-02-05 19:22 出处:网络
During development eclipse uses lots of CPU (50-100%). Is there any way that I can debug this? I used VisualVM but fround nothing interesting in there.

During development eclipse uses lots of CPU (50-100%). Is there any way that I can debug this?

I used VisualVM but fround nothing interesting in there.

I searched the net for making eclipse ".log" file contain more verbose data then the default set, but did not succeed.

I tried uninstalling most of the plugins that I installed recenty. This did not help.

My ENV:

awt.toolkit=sun.awt.windows.WToolkit
com.atlassian.connector.eclipse.branding.ui.isOnlyJiraInstalled=false
eclipse.application=org.eclipse.ui.ide.workbench
eclipse.buildId=M20100909-0800
eclipse.commands=-os
win32
-ws
win32
-arch
x86
-showsplash
c:\Programs\eclipse_helios_jee\\plugins\org.eclipse.platform_3.6.1.v201009090800\splash.bmp
-launcher
c:\Programs\eclipse_helios_jee\eclipse.exe
-name
Eclipse
--launcher.library
c:\Programs\eclipse_helios_jee\plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.R36x_v20100810\eclipse_1309.dll
-startup
c:\Programs\eclipse_helios_jee\plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
-product
org.eclipse.epp.package.jee.product
-vm C:\Program Files\Java\jdk1.6.0_23\jre\bin\server\jvm.dll
-clean
-vm
C:\Program Files\Java\jre6\bin\client\jvm.dll
eclipse.home.location=file:/C:/Programs/eclipse_helios_jee/
eclipse.launcher=c:\Programs\eclipse_helios_jee\eclipse.exe
eclipse.launcher.name=Eclipse
eclipse.p2.data.area=@config.dir/../p2/
eclipse.p2.profile=epp.package.jee
eclipse.product=org.eclipse.epp.package.jee.product
eclipse.startTime=1295619598168
eclipse.vm=C:\Program Files\Java\jre6\bin\client\jvm.dll
eclipse.vmargs=-verbose:gc
-Dosgi.requiredJavaVersion=1.6
-Xms128m
-Xmx512m
-Xss4m
-XX:PermSize=128m
-XX:MaxPermSize=384m
-XX:CompileThreshold=5
-XX:MaxGCPauseMillis=10
-XX:MaxHeapFreeRatio=70
-XX:+CMSIncrementalPacing
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
-XX:+UseFastAccessorMethods
-XX:ReservedCodeCacheSize=128m
-Djava.class.path=c:\Programs\eclipse_helios_jee\plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
equinox.use.ds=true
file.encoding=Cp1252
file.encoding.pkg=sun.io
file.separator=\
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
java.awt.printerjob=sun.awt.windows.WPrinterJob
java.class.path=c:\Programs\eclipse_helios_jee\plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
java.class.version=50.0
java.endorsed.dirs=C:\Program Files\Java\jre6\lib\endorsed
java.ext.dirs=C:\Program Files\Java\jre6\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
java.home=C:\Program Files\Java\jre6
java.io.tmpdir=C:\DOCUME~1\SG0209~1\LOCALS~1\Temp\
java.library.path=c:\Programs\eclipse_helios_jee;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;C:\devtools\oraclexe\app\oracle\product\10.2.0\server\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files\ActivIdentity\ActivClient\;C:\Program Files\Hewlett-Packard\IAM\bin;C:\Program Files\TortoiseSVN\bin;c:\Programs\apache-maven-2.2.1\bin;c:\Programs\UnxUtils\usr\local\wbin;c:\Programs\Ruby187\bin;c:\Programs;C:\Program Files\SlikSvn\bin\;C:\Program Files\MySQL\MySQL Server 5.1\bin;c:\Programs\sphinx-0.9.9-win32\bin;C:\Programs\Git\cmd;C:\Program Files\Bazaar;c:\Program Files\Java\jdk1.6.0_17\bin;C:\Program Files\QuickTime\QTSystem\
java.runtime.name=Java(TM) SE Runtime Environment
java.runtime.version=1.6.0_23-b05
java.specification.name=Java Platform API Specification
java.specification.vendor=Sun Microsystems Inc.
java.specification.version=1.6
java.vendor=Sun Microsystems Inc.
java.vendor.url=http://java.sun.com/
java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi
java.version=1.6.0_23
java.vm.info=mixed mode
java.vm.name=Java HotSpot(TM) Client VM
java.vm.specification.name=Java Virtual Machine Specification
java.vm.specification.vendor=Sun Microsystems Inc.
java.vm.specification.version=1.0
java.vm.vendor=Sun Microsystems Inc.
java.vm.version=19.0-b09
line.separator=

org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
org.eclipse.debug.ui.breakpoints.toggleFactoriesUsed=false
org.eclipse.equinox.launcher.splash.location=c:\Programs\eclipse_helios_jee\\plugins\org.eclipse.platform_3.6.1.v201009090800\splash.bmp
org.eclipse.equinox.simpleconfigurator.configUrl=file:org.eclipse.equinox.simpleconfigurator/bundles.info
org.eclipse.jdt.debug.ui.debuggerActive=true
org.eclipse.jdt.debug.ui.instanceof.IJavaStackFrame=true
org.eclipse.jdt.debug.ui.supportsForceReturn=true
org.eclipse.jdt.debug.ui.supportsInstanceRetrieval=true
org.eclipse.update.reconcile=false
org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1,OSGi/Minimum-1.2,JRE-1.1,J2SE-1.2,J2SE-1.3,J2SE-1.4,J2SE-1.5,JavaSE-1.6
org.osgi.framework.language=en
org.osgi.framework.os.name=WindowsXP
org.osgi.framework.os.version=5.1.0
org.osgi.framework.processor=x86
org.osgi.framework.system.packages=javax.accessibility,javax.activation,javax.activity,javax.annotation,javax.annotation.processing,javax.crypto,javax.crypto.interfaces,javax.crypto.spec,javax.imageio,javax.imageio.event,javax.imageio.metadata,javax.imageio.plugins.bmp,javax.imageio.plugins.jpeg,javax.imageio.spi,javax.imageio.stream,javax.jws,javax.jws.soap,javax.lang.model,javax.lang.model.element,javax.lang.model.type,javax.lang.model.util,javax.management,javax.management.loading,javax.management.modelmbean,javax.management.monitor,javax.management.openmbean,javax.management.relation,javax.management.remote,javax.management.remote.rmi,javax.management.timer,javax.naming,javax.naming.directory,javax.naming.event,javax.naming.ldap,javax.naming.spi,javax.net,javax.net.ssl,javax.print,javax.print.attribute,javax.print.attribute.standard,javax.print.event,javax.rmi,javax.rmi.CORBA,javax.rmi.ssl,javax.script,javax.security.auth,javax.security.auth.callback,javax.security.auth.kerberos,javax.security.auth.login,javax.security.auth.spi,javax.security.auth.x500,javax.security.cert,javax.security.sasl,javax.sound.midi,java开发者_如何转开发x.sound.midi.spi,javax.sound.sampled,javax.sound.sampled.spi,javax.sql,javax.sql.rowset,javax.sql.rowset.serial,javax.sql.rowset.spi,javax.swing,javax.swing.border,javax.swing.colorchooser,javax.swing.event,javax.swing.filechooser,javax.swing.plaf,javax.swing.plaf.basic,javax.swing.plaf.metal,javax.swing.plaf.multi,javax.swing.plaf.synth,javax.swing.table,javax.swing.text,javax.swing.text.html,javax.swing.text.html.parser,javax.swing.text.rtf,javax.swing.tree,javax.swing.undo,javax.tools,javax.transaction,javax.transaction.xa,javax.xml,javax.xml.bind,javax.xml.bind.annotation,javax.xml.bind.annotation.adapters,javax.xml.bind.attachment,javax.xml.bind.helpers,javax.xml.bind.util,javax.xml.crypto,javax.xml.crypto.dom,javax.xml.crypto.dsig,javax.xml.crypto.dsig.dom,javax.xml.crypto.dsig.keyinfo,javax.xml.crypto.dsig.spec,javax.xml.datatype,javax.xml.namespace,javax.xml.parsers,javax.xml.soap,javax.xml.stream,javax.xml.stream.events,javax.xml.stream.util,javax.xml.transform,javax.xml.transform.dom,javax.xml.transform.sax,javax.xml.transform.stax,javax.xml.transform.stream,javax.xml.validation,javax.xml.ws,javax.xml.ws.handler,javax.xml.ws.handler.soap,javax.xml.ws.http,javax.xml.ws.soap,javax.xml.ws.spi,javax.xml.ws.wsaddressing,javax.xml.xpath,org.ietf.jgss,org.omg.CORBA,org.omg.CORBA_2_3,org.omg.CORBA_2_3.portable,org.omg.CORBA.DynAnyPackage,org.omg.CORBA.ORBPackage,org.omg.CORBA.portable,org.omg.CORBA.TypeCodePackage,org.omg.CosNaming,org.omg.CosNaming.NamingContextExtPackage,org.omg.CosNaming.NamingContextPackage,org.omg.Dynamic,org.omg.DynamicAny,org.omg.DynamicAny.DynAnyFactoryPackage,org.omg.DynamicAny.DynAnyPackage,org.omg.IOP,org.omg.IOP.CodecFactoryPackage,org.omg.IOP.CodecPackage,org.omg.Messaging,org.omg.PortableInterceptor,org.omg.PortableInterceptor.ORBInitInfoPackage,org.omg.PortableServer,org.omg.PortableServer.CurrentPackage,org.omg.PortableServer.POAManagerPackage,org.omg.PortableServer.POAPackage,org.omg.PortableServer.portable,org.omg.PortableServer.ServantLocatorPackage,org.omg.SendingContext,org.omg.stub.java.rmi,org.w3c.dom,org.w3c.dom.bootstrap,org.w3c.dom.css,org.w3c.dom.events,org.w3c.dom.html,org.w3c.dom.ls,org.w3c.dom.ranges,org.w3c.dom.stylesheets,org.w3c.dom.traversal,org.w3c.dom.views,org.w3c.dom.xpath,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers
org.osgi.framework.vendor=Eclipse
org.osgi.framework.version=1.5.0
org.osgi.supports.framework.extension=true
org.osgi.supports.framework.fragment=true
org.osgi.supports.framework.requirebundle=true
os.arch=x86
os.name=Windows XP
os.version=5.1
osgi.arch=x86
osgi.bundles=reference:file:org.eclipse.equinox.simpleconfigurator_1.0.200.v20100503.jar@1:start
osgi.bundles.defaultStartLevel=4
osgi.bundlestore=C:\Programs\eclipse_helios_jee\configuration\org.eclipse.osgi\bundles
osgi.clean=true
osgi.configuration.area=file:/C:/Programs/eclipse_helios_jee/configuration/
osgi.framework=file:/c:/Programs/eclipse_helios_jee/plugins/org.eclipse.osgi_3.6.1.R36x_v20100806.jar
osgi.framework.extensions=
osgi.framework.shape=jar
osgi.framework.version=3.6.1.R36x_v20100806
osgi.install.area=file:/C:/Programs/eclipse_helios_jee/
osgi.instance.area=file:/C:/repo/R2/workspace/
osgi.instance.area.default=file:/C:/Documents and Settings/sg0209983/workspace/
osgi.logfile=C:\repo\R2\workspace\.metadata\.log
osgi.manifest.cache=C:\Programs\eclipse_helios_jee\configuration\org.eclipse.osgi\manifests
osgi.nl=en_US
osgi.os=win32
osgi.requiredJavaVersion=1.6
osgi.splashLocation=c:\Programs\eclipse_helios_jee\\plugins\org.eclipse.platform_3.6.1.v201009090800\splash.bmp
osgi.splashPath=platform:/base/plugins/org.eclipse.platform
osgi.syspath=c:\Programs\eclipse_helios_jee\plugins
osgi.tracefile=C:\repo\R2\workspace\.metadata\trace.log
osgi.ws=win32
path.separator=;
sun.arch.data.model=32
sun.boot.class.path=C:\Program Files\Java\jre6\lib\resources.jar;C:\Program Files\Java\jre6\lib\rt.jar;C:\Program Files\Java\jre6\lib\sunrsasign.jar;C:\Program Files\Java\jre6\lib\jsse.jar;C:\Program Files\Java\jre6\lib\jce.jar;C:\Program Files\Java\jre6\lib\charsets.jar;C:\Program Files\Java\jre6\lib\modules\jdk.boot.jar;C:\Program Files\Java\jre6\classes
sun.boot.library.path=C:\Program Files\Java\jre6\bin
sun.cpu.endian=little
sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
sun.desktop=windows
sun.io.unicode.encoding=UnicodeLittle
sun.jnu.encoding=Cp1252
sun.management.compiler=HotSpot Client Compiler
sun.os.patch.level=Service Pack 3
user.country=US
user.dir=c:\Programs\eclipse_helios_jee
user.home=C:\Documents and Settings\sg0209983
user.language=en
user.name=SG0209983
user.timezone=Europe/Belgrade
user.variant=


Your Eclipse is probably thrashing memory. First, I'd try bumping up your heap size to something bigger. I usually run with:

-vmargs -Xmx1024M -XX:PermSize=64M -XX:MaxPermSize=256M

Your current Xmx is half that and this could be a problem.

Also, take a look at the Progress view. There may be a job running that you can see.

If that doesn't help anything, you can try taking some thread dumps using the jstack command. If you take a few dumps, then you may be able to get an idea of where all that cpu wastage is.

0

精彩评论

暂无评论...
验证码 换一张
取 消