Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [hyades-dev] Bug 62382 "Open with>" action in Profiling Monitor view should only show relevant views

I'm afraid using the statistical view as an example might have clouded the 
issue.

The bottom line is that it's possible for data to exist in the profile 
data set even without enabling the profiling type that usually produces 
it. For example, user-defined probes can populate the execution trace data 
model. 

In your proposal, you wrote that a right-click on the agent would list the 
union of all views associated with all profiling types enabled during that 
run, plus all views which aren't associated with any particular profiling 
type. Did I get that right? But in the case where (for instance) trace 
data appears without enabling the trace profiling type, is it still 
possible for the user to open a trace data viewer?

Put that another way: is there ANY place in the UI where a user can open a 
view that IS associated with profiling types, in a case where NONE of 
those profiling types were enabled? If not, I think that's bad. 

If you create such a place, I expect it'll be a complete list of all views 
(as we have today), which is unfortunate but at least doesn't block any 
capability.

-- Allan Pratt, apratt@xxxxxxxxxx
Rational software division of IBM




"Curtis D'Entremont" <curtispd@xxxxxxxxxx> 
Sent by: hyades-dev-admin@xxxxxxxxxxx
07/19/2004 02:03 PM
Please respond to
hyades-dev


To
hyades-dev@xxxxxxxxxxx
cc

Subject
Re: [hyades-dev] Bug 62382 "Open with>" action in Profiling Monitor view 
should only show relevant views







Thanks for the concern;  you can still attach a viewer to the profiling 
agent itself, without specifying any profiling types. This is how all the 
viewers are currently set up and how the statistical viewer will remain. 
With the patch, it will behave the same as it does now for the agent - if 
you do an open-with on the agent you'll see the view. But, the view won't 
show up in any profiling types. Is this satisfactory? 

Your more complete solution is a good one, I was considering it earlier. 
But unfortunately it wouldn't fit well with the current (old and slightly 
flawed) design. Right now, viewer implementations in the extension point 
are simply IActions that open the viewers. So any change in this would be 
a breaking change, which we want to avoid at this stage. Eventually I want 
to improve the messages that are shown when no data is visible in a 
viewer, and explain exactly what to do in order to get data. This would 
prompt users to discover the views and use them, as opposed to not knowing 
they exist if we hide them. There is also the common case of not having 
any data in the viewer yet. We still want to allow users to open the view 
while they wait for the data to come in. 

By the way, it was wednesday at noon EST, not today ;-) 

Thanks, 
Curtis d'Entremont
Problem Determination Tools
IBM Toronto Lab

Phone: (905) 413-5754
E-Mail: curtispd@xxxxxxxxxx




Allan K Pratt <apratt@xxxxxxxxxx> 
Sent by: hyades-dev-admin@xxxxxxxxxxx 
07/19/2004 04:14 PM 

Please respond to
hyades-dev


To
hyades-dev@xxxxxxxxxxx 
cc
hyades-dev@xxxxxxxxxxx, hyades-dev-admin@xxxxxxxxxxx 
Subject
Re: [hyades-dev] Bug 62382 "Open with>" action in Profiling Monitor view 
should only show relevant views








I guess it's past noon EST, but I would like to describe a problem with 
your solution:

It's possible for a view to have interesting data in it even though none 
of the related profiling types was enabled. This can happen if other code 
writes compatible fragments to the trace data stream. Probekit, for 
example, can permit user-written probes to write fragments like this, and 
we've demonstrated this feature for populating the statistical view. 
There's no reason a probe couldn't populate the execution trace view the 
same way.

Bottom line: data can arrive to populate a profiling view WITHOUT anybody 
enabling one of the expected profiling types. If that means the user can't 

open a view (or it's awkward or confusing to do so), then this design is 
incomplete.

A more complete (but heavier-weight) design would add an operation to each 

view provider, something to let the menu owner could pass the data set to 
the view and ask, "Would you show anything if I opened you?" An 
implementer of a view should make this a lightweight operation, returning 
true or false after a quick glance at the data.

-- Allan Pratt, apratt@xxxxxxxxxx
Rational software division of IBM




"Curtis D'Entremont" <curtispd@xxxxxxxxxx> 
Sent by: hyades-dev-admin@xxxxxxxxxxx
07/19/2004 10:27 AM
Please respond to
hyades-dev


To
hyades-dev@xxxxxxxxxxx
cc

Subject
[hyades-dev] Bug 62382 "Open with>" action in Profiling Monitor view 
should only show relevant views







This is required action for any hyades extensions that define their own 
trace viewers or profiling types: 

For Hyades 3.0.1 we will be including the following usability fix: 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=62382 

Currently we show all profiling-related viewers when trying to open a 
profiling agent or profiling type. The idea is to show only relevant 
viewers to reduce complexity. This applies to both the "open with" menu 
and the default viewer when double clicking. Thus, we need to declare 
which profiling type(s) a viewer applies to. 

Here's what you need to do. 

If you define your own profiling type, declare a typeDescription extension 

for the profiling type that viewers can link to. The type will be the 
profiling type id. Here is an example for the memory analysis profiling 
type: 

  <extension 
        point="org.eclipse.hyades.ui.typeDescriptions"> 
     <typeDescription 
           name="%memoryType" 
           type="org.eclipse.hyades.profilingType.memoryHeap" 
           icon="icons/full/obj16/memleakantype_obj.gif" 
           extension="trace"> 
     </typeDescription> 
  </extension> 

This will allow viewers to be associated with the profiling type, and the 
type will show up in the Trace Associations preference page. 

If you define your own viewer, update the type in your analyzerExtension 
that you use to define your viewers. For example, here is the one for 
Package Statistics: 

  <extension 
        point="org.eclipse.hyades.ui.analyzerExtensions"> 
     <analyzerExtension 
           name="%STR_OPEN_PACKAGE_ST_ACTION" 
           type="org.eclipse.hyades.profilingType.memoryHeap"   <-- (used 
to be "Profiler") 
           icon="./icons/full/cview16/packclass_statistic_view.gif" 
           isDefault="true" 
           class=
"org.eclipse.hyades.trace.views.actions.internal.OpenPackageStatisticViewAction" 


           id=
"org.eclipse.hyades.trace.views.actions.internal.OpenPackageStatisticViewAction" 


           extension="trace"> 
     </analyzerExtension> 
  </extension> 

If you want your viewer to apply to more than one type, or want to use an 
existing viewer for your profiling types, you can use the extensionBinding 

extension point. The benefit here is that you don't have to create another 

analyzerExtension and duplicate all the strings and icon. Here's an 
example linking the Package Statistics viewer to the method coverage 
profiling type (a meaningless example): 

  <extension 
        point="org.eclipse.hyades.ui.extensionBinding"> 
     <extensionBinding 
           extensionId=
"org.eclipse.hyades.trace.views.actions.internal.OpenPackageStatisticViewAction" 


           type="org.eclipse.hyades.profilingType.methodCoverage"> 
     </extensionBinding> 
  </extension> 

I've attached patches on source for hyades 3.0.1 plugins; please use these 

to test your changes before the fix goes in. To apply, right click on the 
project in your workspace -> Team -> Apply patch. Make sure of the 
following: 

- Right click->Open with on profiling types will only show viewers 
relevant to that profiling type. 
- Right click->Open with on profiling agents show all viewers from its 
profiling types, and any viewers that were defined directly on the 
profiling agent (like statistical view). 
- If no profiling types are present (e.g. for perfmon agent, J2EE request 
profiler, import profile file - known bug), viewers from all profiling 
types are shown, as before. 
- Double clicking on a profiling type opens an appropriate viewer for that 

type. 
- Double clicking on a profiling agent with profiling types opens the 
appropriate viewer for the first profiling type listed under it in 
alphabetical order. 

If you find any problems, please let me know right away. 
If there are no issues raised, the fix will go in wednesday at noon EST. 



Thanks, 
Curtis d'Entremont
Problem Determination Tools
IBM Toronto Lab

Phone: (905) 413-5754
E-Mail: curtispd@xxxxxxxxxx

[attachment "patches_62382.zip" deleted by Allan K Pratt/Cupertino/IBM] 



Back to the top