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 145241 - ProjectTypeProfiler.startProfilingSession = true -> some skipped implementation
Summary: ProjectTypeProfiler.startProfilingSession = true -> some skipped implementation
Status: RESOLVED INVALID
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-27 04:07 UTC by Jesse Glick
Modified: 2008-08-27 16:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2008-08-27 04:07:37 UTC
In AntActions.doProfileProject, if ptp.startProfilingSession returns false, NetBeansProfiler.runTarget is called which
ultimately calls ActionUtils.runTarget. But first it calls

1. RerunAction.get(RerunAction.class).updateAction()

2. [sometimes] HeapDumpWatch.getDefault().monitor(....)

These steps are apparently skipped in case sPS returns true, as I presume it would in the case of Maven profiling
integration.
Comment 1 Jiri Sedlacek 2008-08-27 09:47:05 UTC
There's no problem here, the code works as designed. The ProjectTypeProfiler.startProfilingSession has been recently
added as a workaround for experimental Maven support which skips starting profiling via Ant, just don't use it if you
don't need it or return false. It's no public API to be used by other modules.

If you add your module as a friend and something doesn't work, it would probably be more convenient to file a RFE if you
need some extra functionality or at least contact the developers instead of filing defects.

FYI, for some of the upcoming NetBeans releases we are planning to introduce some kind of general profiling
API/framework similar to debugger API. We will appreciate any feedback and ideas on possible features etc. - integration
with a generic Project will certainly be one of the features.
Comment 2 Jesse Glick 2008-08-27 16:09:28 UTC
I asked for information in issue #142284, but there was no response. (Sorry but I have no idea who works on the profiler
these days so my only channel of communication is Issuezilla.) Anyway I think I have enough working - see issue #144921.
There are a lot of packages exposed to friends and it took a while to decide that I could ignore nearly everything
except ProjectTypeProfiler; even this interface has a lot of methods which do not seem like they are necessary - perhaps
it could be split up into a set of optional services or something like this.

So for Maven profiling it is intentional that RerunAction action does not get updated and there is no heap dump watch?
Just curious; these things don't look to be related to Ant vs. Maven (just judging by the names).

I don't know enough yet about Profiler internals to give detailed feedback about a new API. What is most confusing is
that for every other kind of project action you use ActionProvider to define what the project can support, yet for the
profiler there is a completely unrelated friend SPI. This seems odd since you would expect that running, debugging, and
profiling would just be minor variants of the same action. Also as mentioned in issue #142284, there is no apparent
Quick Profile action integrated with CoS (I had to make my own for autoproject.profile).