This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 204074 - Profile action does not support "Compile On Save" feature
Summary: Profile action does not support "Compile On Save" feature
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Ide (show other bugs)
Version: 7.0.1
Hardware: All All
: P3 normal (vote)
Assignee: J Bachorik
URL:
Keywords:
Depends on: 203519
Blocks:
  Show dependency tree
 
Reported: 2011-10-21 16:01 UTC by ceklock
Modified: 2012-04-02 09:43 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ceklock 2011-10-21 16:01:31 UTC

    
Comment 1 ceklock 2011-10-21 16:02:54 UTC
When I run "Profile main project", the profiler calls "Clean and Build"
without need before the program is run/profiled, when "Compile on Save" is
enabled.


Product Version: NetBeans IDE 7.0.1 (Build 201107282000)
Java: 1.6.0_29; Java HotSpot(TM) Server VM 20.4-b02
System: Windows 7 version 6.1 running on x86; Cp1252; en_BR (nb)
Comment 2 ceklock 2011-10-21 16:04:51 UTC
Output window log when "Profile Main Project" is executed:


init:
profile-init:
Deleting:
C:\Users\Carlos\Desktop\projetos_java\logics\build\built-jar.properties
deps-jar:
Updating property file:
C:\Users\Carlos\Desktop\projetos_java\logics\build\built-jar.properties
init:
deps-clean:
Updating property file:
C:\Users\Carlos\Desktop\projetos_java\logics\build\built-clean.properties
Deleting directory C:\Users\Carlos\Desktop\projetos_java\logics\build
clean:
Created dir: C:\Users\Carlos\Desktop\projetos_java\logics\build\classes
Created dir: C:\Users\Carlos\Desktop\projetos_java\logics\build\empty
Created dir:
C:\Users\Carlos\Desktop\projetos_java\logics\build\generated-sources\ap-source-output
Compiling 2345 source files to
C:\Users\Carlos\Desktop\projetos_java\logics\build\classes
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Copying 472 files to C:\Users\Carlos\Desktop\projetos_java\logics\build\classes
compile:
profile:
Agente Profiler: aguardando conexão na porta 5140, tempo de espera 10 segundos
(Versão do protocolo: 11)
Agente Profiler: conexão estabelecida com a ferramenta
Agente Profiler: sessão local acelerada
...
Comment 3 ceklock 2011-10-21 16:23:24 UTC
It seems it happens only at first time after a CVS Update or something...
Comment 4 ceklock 2011-10-22 02:48:32 UTC
Steps to reproduce: 

- Open a big project with many packages and classes;
- Make sure "Compile on Save" is enabled;
- Do "CVS Update" or "Clean and Build";
- Run a class.
Comment 6 J Bachorik 2011-10-25 14:23:06 UTC
I think the comments #4 and #5 weren't really meant to be here.

Anyway, when profiling a project the build phase (with a potential clean which I have not seen personally yet) is necessary as the profiler is not really aware of the CoS infrastructure. It needs the classes to be compiled and placed in the standard locations by the ant script.

I wouldn't consider it a bug, per se, rather an enhancement. In fact, all the relevant profiler actions will need to be brought up to date with the rest of the IDE, as tracked in #203519.
Comment 7 ceklock 2011-10-25 16:26:11 UTC
Comment #4 really was not meant to be here, but I don't know how to delete. 

Comment #5 shows some issues that may be related to this.
Comment 8 ceklock 2011-10-25 20:21:23 UTC
For me it seems that Compile on Save is not reliable...

Sometimes I have some bizarre errors that don't happen when Compile on Save is disabled.
Comment 9 J Bachorik 2012-04-02 09:43:31 UTC
CompileOnSave works the same way as for Run/Debug action now.

http://hg.netbeans.org/profiler-main/rev/cf681524d222