CND70GizmoUserView

Revision as of 15:02, 6 November 2009 by Admin (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)

Gizmo Project User View

Categories

  • Cpu
  • Memory
  • Synchronization

Indicators and detailed views

There are two ways of representing information: indicators and detailed views.

Indicator

Indicator is a very small element that is (by default) always shown on the screen and is updated frequently while the program is running. Indicators are shown in the NetBeans tool bar. Double-clicking on each indicator opens correspondent detailed view.

Below is an example of three graph indicators that are synchronized with each other: File:3_graphs_with_text_CND70GizmoUserView.png


Detailed view

  • Shows more detailed information by request.
  • Representation: a table or a tree-table. It can also be a master-detail view, where master view is a table and detail view is a tree or tree-table.
  • Allows to easily navigate into source code
  • Is static - if the application is still running, the view is not live-updated.

Function/line

Some detailed views use not just functions, but pairs function/line (in the form name:line - e.g. main:236). This allows to show more detailed information.


Main user scenario

  1. Indicators are ON by default, so user sees them each time he runs a program. So user can notice that a problem exists.
  2. User can then open a detailed view to get more information.
  3. From detailed view user can easily navigate to code

Constraints

  • Collecting information and showing it in indicators slows down the program for no more than 10%

CPU

Indicator

A graph that shows the history of the user time (in blue) and system time (in red) percentage during last 30 seconds: File:cpu1_CND70GizmoUserView.png

Showing total execution time

Total program execution time (real, user and system) is shown in output window after the program has finished.


Detailed view

Hot spots view (defining feature)

A table of hot spots in the terms of functions. It shows

  • own time
  • inclusive time (not shown on the figure below)

Double-clicking on the functions opens it in editor

File:new-hotspots_CND70GizmoUserView.png

Callers/callees view (target feature)

A tree table that shows one of the two modes

  • callers
  • callees

Both shows own and inclusive time.

The callers/callees are shown for the selected line of the hot spot view. So hot spots and callers/callees form a master-detail view.

Double-clicking on the functions opens it in editor.


Annotated source (target feature)

Source code in editor should be annotated with its execution time


Memory

Indicator

A text indicator that shows

  • the current amount of virtual memory occupied by user program
  • the peak amount of memory occupied since program startup

(in the form current/peak)

If the program does not free some memory when finished, the indicator changes color (to red?)


Detailed view

A table of functions/lines that allocated memory, and did not freed it, with the amount of memory allocated and not freed at the moment user opens view (in the case the program is still running) or my the moment program finished (if it has already finished).

If we implement memory usage graphics, then this view should be also available from the graphics, in this case the moment of time is determined by the point of the graphics user clicked on.

Q: Should it be a displayed as a list of function:line pairs, or just a list of functions that are expandable (in the case there were more than one memory allocation in function)?


Reporting leaks

When program that has memory leaks is finished, they are reported

  • in output window (hyperlinking opens details view)
  • indicator changes its color (becomes red?)


Synchronization

Indicator

Indicator shows the percentage of time spent in waiting (on mutextes, not on conditional variables) in all threads.

Q: Isn't it better to show not all threads percentage, but maximum percentage for a thread? (for example, if one thread is 80% blocked, indicator should show 80%, regardless of the fact that other 10 threads run ok)?

The color of the indicator depends on the percentage: green for low percentage and red for high percentage

File:new-sync-indicator-green_CND70GizmoUserView.png low waiting time percent
File:new-sync-indicator-green-to-yellow_CND70GizmoUserView.png medium waiting time percent
File:new-sync-indicator-green-to-red_CND70GizmoUserView.png higher waiting time percent
File:new-sync-indicator-red_CND70GizmoUserView.png very high waiting time percent


Detailed view

Synchronization hot spots (defining feature)

A table of functions/lines that shows

  • Time spent in waiting on mutexes
  • Time that other threads spent on mutexes that were locked by this function

(the latter is multiplied by the number of threads that were waiting for this mutex)


It would be fine if user had an ability to filter this table by threads (include only data that is related to certain threads; or vice versa, exclude certain threads)


Threads (target feature)

A table that shows list of threads and for each thread time spent in mutexes.

Q: if this view does not allow to drill down to details (finally to code), it has few use. So it should be possible to go to details... which? (Proposal: hot spots for the selected threads)


Brief report in output window

When the program finishes execution, a brief report is shown in the output pane. It shows

  • CPU
  • Real time
  • User time
  • System time
  • Memory
  • Peak allocation
  • Leaks
  • Synchronization:
  • maximum percentage of time spent in mutexes for thread
  • average percentage of time spent in mutexes for all threads

Each figure is a hyperlink that leads to the appropriate view


Time line ("Nice to have" feature)

Time line shows thread states during the application life cycle. It allows user to understand "in general", how does the application threading model work.

It would be also quite useful to have graphs of memory and CPU utilization synchronized with timeline. (No mockup picture available)

File:timeline_CND70GizmoUserView.png

Saving data

In 7.0 data is not saved between sessions. You can see the data only for the most recent session.

Filtering by time

It would be fine if user was able to specify the time interval of interest. In this case all views should show data only for this interval.

Options

  • By default gizmo is enabled for all projects with all data collectors and indicators.
  • There should be a way to disable gizmo at all for a particular project
  Most obvious way is to have an option somewhere in project options and save it in project options as well.
  Do we have a way (API, SPi or something) to expand cnd (and maybe php) projects?
  • There should be a way to turn particular indicator on/off
  I propose a checkbox near every indicator to turn it on/off.
  • There should be a way to turn particular data collection on/off
  I propose a checkbox near every indicator to turn corresponding data collection on/off.
  If indicator is turned off data collection for the corresponding tool is turned off automatically.
  • indicators panel always opened on gizmo (project) start if gizmo is enabled for this project and at least one indicator is enabled
  • if available, collect provider is used, then d-trace; if none is available then all data items are disabled and d-light is used only for indicators
  • if d-light is selected, but user do not have root password then probably we should automatically select none provider?

Options per project: File:Screenshot-Project Properties - Quote 13-1.png

Other options: TBD

  • when to ask for user password (on d-light run may be confusing for users)

Supported platforms

Supported platforms are

  • Solaris
  • Linux

It will probably work on Mac as well (at least some features).

Sources of information related issues:

For indicators, there are no issues (we'll use prstat on Solaris and top on Linux)

For detailed data, there is two sources of information:

  • Sun Studio collect (works on Solaris and Linux)
  • DTrace (works on Solaris only; will probably work on Mac).

End user issues can be caused by two facts:

  • Sun Studio collect is not installed on user machine (can be the case on both platforms; usually it is not installed on Linux)
  • User does not have DTrace privileges (this is the case on Solaris)

Q: How to solve the issue with the absence of Sun Studio collect? Q: How to solve the issue of lacking DTrace privileges? This can be determined, and we can ask user root password. The issue is that since the observability is ON by default, user runs the "Hello" program - and is asked for root password?!

See also: CNDObservabilityCollectors

Other open questions

  • Where to place detailed views (proposal: not to hide editor area since our final goal is to find the place of interest in code)
  • How to configure observability tools?
  • What to configure
  • Options look and feel
  • How to switch observability tools off (Tools->Options? Context menu on indicators? Both?)
  • Should there be a possibility of switching off per project? (VK: I don't think so)
  • When user clicks on indicator, should all three detailed views be opened or only the one that corresponds to indicator? (VK: I believe only one should be opened)
  • What to do on rerun? In details: user opened detailed views, then rerun application or run another one. What happens with views? If after rerun user clicks indicators, what happens with previous views?) VK: I would propose for the 1-st release to keep a single view for each type and reuse it.

Answered questions

  • Where to place indicators (toolbar, output pane, separate panel?). Answer: indicators are placed in a separate view that is overlapped with Navigator. By default it is made active when program starts (unless observability is switched off)
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo