Lines 137-140
Link Here
|
137 |
</antcall> |
137 |
</antcall> |
138 |
</target> |
138 |
</target> |
139 |
|
139 |
|
|
|
140 |
|
141 |
<!-- |
142 |
<target name="-profile-init-macrodef-profile"> |
143 |
<macrodef name="resolve"> |
144 |
<attribute name="name"/> |
145 |
<attribute name="value"/> |
146 |
<sequential> |
147 |
<property value="${env.@{value}}" name="@{name}"/> |
148 |
</sequential> |
149 |
</macrodef> |
150 |
<macrodef name="profile"> |
151 |
<attribute name="classname" default="${main.class}"/> |
152 |
<element name="customize" optional="true"/> |
153 |
<sequential> |
154 |
<property environment="env"/> |
155 |
<resolve value="${profiler.info.pathvar}" name="profiler.current.path"/> |
156 |
<java jvm="${profiler.info.jvm}" dir="${profiler.info.dir}" classname="@{classname}" fork="true"> |
157 |
<jvmarg value="${profiler.info.jvmargs.agent}"/> |
158 |
<jvmarg line="${profiler.info.jvmargs}"/> |
159 |
<env path="${profiler.info.agentpath}:${profiler.current.path}" key="${profiler.info.pathvar}"/> |
160 |
<arg line="${application.args}"/> |
161 |
<classpath> |
162 |
<path path="${run.classpath}"/> |
163 |
</classpath> |
164 |
<syspropertyset> |
165 |
<propertyref prefix="run-sys-prop."/> |
166 |
<mapper to="*" from="run-sys-prop.*" type="glob"/> |
167 |
</syspropertyset> |
168 |
<customize/> |
169 |
</java> |
170 |
</sequential> |
171 |
</macrodef> |
172 |
</target> |
173 |
|
174 |
<target name="-profile-init-check" > |
175 |
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> |
176 |
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> |
177 |
</target> |
178 |
--> |
179 |
<!-- |
180 |
================= |
181 |
PROFILING SECTION |
182 |
================= |
183 |
--> |
184 |
<target name="profile" description="Profile a project in the IDE."> |
185 |
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> |
186 |
<nbprofiledirect |
187 |
jvmargsprefix="-J" |
188 |
jvmargsproperty="profiler.jvmargs" |
189 |
jvmproperty="profiler.jdkhome" |
190 |
mainclass="org.netbeans.Main" |
191 |
> |
192 |
<classpath> |
193 |
<fileset dir="${netbeans.dest.dir}"> |
194 |
<include name="**/*.jar"/> |
195 |
</fileset> |
196 |
<fileset dir="${cluster}"> |
197 |
<include name="**/*.jar"/> |
198 |
</fileset> |
199 |
</classpath> |
200 |
</nbprofiledirect> |
201 |
|
202 |
<echo message="value1: ${profiler.jvmargs}" /> |
203 |
<echo message="value2: ${profiler.jdkhome}" /> |
204 |
|
205 |
<antcall target="run"> |
206 |
<param name="run.args" value="${profiler.jvmargs} --jdkhome ${profiler.jdkhome}"/> |
207 |
</antcall> |
208 |
</target> |
209 |
|
140 |
</project> |
210 |
</project> |