Fully featured low overhead profiler for Java EE and Java SE platforms.
Ultimate profiling and monitoring solution for Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

[rfe][patch] Allow 3rd party launch configuration types

Moderators: Vladimir Kondratyev, Anton Katilin

[rfe][patch] Allow 3rd party launch configuration types

Postby Andrei.L » Fri Nov 21, 2014 2:35 pm

Hi,
Great tool, but I'm facing the issue that I cannot profile "custom" launch configurations (which are not known by YourKit Eclipse plugin).
The fix on *my* side would be trivial: I could just add the code below to my plugin and everyone would be happy:
Code: Select all
    <extension
          point="org.eclipse.debug.core.launchDelegates">
             <launchDelegate
                id="com.yourkit.profiler.junitDelegate_EWC_TEST"
                name="Profile EWC JUNit Test"
                delegate="com.yourkit.eclipse34Plugin.YkJUnitPluginLaunchConfigurationDelegate"
                type="com.verigy.itee.env.EWC_TEST_LAUNCH"
                modes="yourkitprofile">
                <modeCombination modes="yourkitprofile"/>
             </launchDelegate>

             <launchDelegate
                id="com.yourkit.profiler.junitDelegate_EWC"
                name="Profile EWC"
                delegate="com.yourkit.eclipse34Plugin.YkWorkbenchLaunchConfigurationDelegate"
                type="com.verigy.itee.env.EWC_LAUNCH"
                modes="yourkitprofile">
                <modeCombination modes="yourkitprofile"/>
             </launchDelegate>
    </extension>

BUT...

The package com.yourkit.eclipse34Plugin is not exported by Yourkit plugin.

Adding one single line
Code: Select all
 
Export-Package: com.yourkit.eclipse34Plugin

to the MANIFEST.MF of the yourkit plugin would greatly help every tool developer providing it's own launch configuration types.

Could you please do this?
Regards,
Andrey
Andrei.L
 
Posts: 16
Joined: Thu Mar 12, 2009 5:23 am

Re: [rfe][patch] Allow 3rd party launch configuration types

Postby Anton Katilin » Fri Nov 21, 2014 7:07 pm

Hi Andrey

Thank you for the suggestion. We'll try to add the export line in the next build.

Did you test a local patched copy of YourKit plugin to ensure this single change is enough?

Best regards,
Anton
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am

Re: [rfe][patch] Allow 3rd party launch configuration types

Postby Andrei.L » Fri Nov 21, 2014 7:22 pm

Yes.
Andrei.L
 
Posts: 16
Joined: Thu Mar 12, 2009 5:23 am

Re: [rfe][patch] Allow 3rd party launch configuration types

Postby Anton Katilin » Mon Nov 24, 2014 2:19 pm

We'll add it in the next build 14114.
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am

Re: [rfe][patch] Allow 3rd party launch configuration types

Postby Andrei.L » Mon Nov 24, 2014 2:26 pm

Actually there is one more issue with the launch contributed by YourKit:
now after the fix I can see my launch configuration is supported, I see that the YourKit does *not* initializes my original launchConfigurationTabGroup and so I have to implement an ugly workaround by contribution a dummy tab to the group.

This initialization is important because launchConfigurationTabGroup allows you to perform some default launch configuration initialization *before* the tabs are created (ILaunchConfigurationTabGroup.setDefaults(ILaunchConfigurationWorkingCopy configuration)).

My workaround is to contribute an extra dummy tab via org.eclipse.debug.ui.launchConfigurationTabs extension point and run the initialization in ILaunchConfigurationTab.setDefaults(ILaunchConfigurationWorkingCopy configuration), without any guarantee about the initialization order. Additionally users see one extra dummy tab with no content... But at least this works.

It would be nice if you could properly initialize contributed launchConfigurationTabGroup's in your com.yourkit.eclipse34Plugin.YkWorkbenchTabGroup and com.yourkit.eclipse34Plugin.YkJUnitPluginTabGroup.

You can check the good example how jacoco does this: https://github.com/jacoco/eclemma/blob/ ... Group.java

Thanks to the clever jacoco solution I had no issues with integrating coverage launch configurations in my custom launch config.

Regards,
Andrey
Andrei.L
 
Posts: 16
Joined: Thu Mar 12, 2009 5:23 am

Re: [rfe][patch] Allow 3rd party launch configuration types

Postby Anton Katilin » Mon Nov 24, 2014 3:34 pm

Hi Andrey

Thank you for the suggestion. We'll look at the suggested code.

Meanwhile, just a thought: what about explicitly adding the YourKit configuration tab to your custom tab set? Your plugin already has dependencies on YourKit stuff, so adding another one should not be a problem. You could use the public constructor com.yourkit.eclipse34Plugin.YkTab.YkTab(), perhaps via reflection to make the dependency "weak". The mentioned YourKit tab groups do the same: take original tab array and create a new one with the "new YkTab()" result inserted.

Best regards,
Anton
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am

Re: [rfe][patch] Allow 3rd party launch configuration types

Postby Andrei.L » Mon Nov 24, 2014 3:45 pm

I could try to do so later. For now I'm happy with my ugly workaround (yea it works finally!), and I have no compile time dependency to yourkit classes (everything is xml based).
Thanks again.
Regards,
Andrey
Andrei.L
 
Posts: 16
Joined: Thu Mar 12, 2009 5:23 am

Re: [rfe][patch] Allow 3rd party launch configuration types

Postby Anton Katilin » Thu Nov 27, 2014 8:57 am

Hi Andrey

We've published the build 14114. The Eclipse plugin manifest now includes "Export-Package: com.yourkit.eclipse34Plugin" as requested.

Best regards,
Anton
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am

Re: [rfe][patch] Allow 3rd party launch configuration types

Postby Andrei.L » Thu Nov 27, 2014 9:21 am

Thanks Anton. Any news on the proposed tabgroup implementation change?
CU
Andrey
Andrei.L
 
Posts: 16
Joined: Thu Mar 12, 2009 5:23 am

Re: [rfe][patch] Allow 3rd party launch configuration types

Postby Anton Katilin » Thu Nov 27, 2014 10:31 am

This change is big and potentially dangerous, and the issue it covers is not critical, so we will not make it in the released version 2014. Instead, we have plans to try this suggested approach in the next version. We'll open early access program (EAP) soon.
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am

Re: [rfe][patch] Allow 3rd party launch configuration types

Postby Andrei.L » Thu Nov 27, 2014 10:37 am

Thanks, fully agree & understand.
Have a nice day!
Andrey
Andrei.L
 
Posts: 16
Joined: Thu Mar 12, 2009 5:23 am

Re: [rfe][patch] Allow 3rd party launch configuration types

Postby Anton Katilin » Mon Feb 02, 2015 1:29 pm

Hi Andrey

Tab group implementation has been reworked in build 15022:

http://www.yourkit.com/eap

Best regards,
Anton
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: Google [Bot] and 9 guests