external/trace-viewer.git
3 days agoUse intersection instead of containment to determine time summaries master
nduca@chromium.org [Sat, 19 Apr 2014 07:02:17 +0000 (07:02 +0000)]
Use intersection instead of containment to determine time summaries

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1265 0e6d7f2b-9903-5b78-7403-59d27f066143

4 days agoOverride window.history.pushState during test running
nduca@chromium.org [Sat, 19 Apr 2014 05:31:14 +0000 (05:31 +0000)]
Override window.history.pushState during test running

pushState shouldn't take effect during test running. It mucks with
the test runners state, which is 99.9999% of the time what the
developer wants the pushState to be about.

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1264 0e6d7f2b-9903-5b78-7403-59d27f066143

4 days agoPrettify test runner: show title, be sans-serif
nduca@chromium.org [Sat, 19 Apr 2014 05:31:01 +0000 (05:31 +0000)]
Prettify test runner: show title, be sans-serif

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1263 0e6d7f2b-9903-5b78-7403-59d27f066143

4 days agoOnly load the test suite needed to run the selected test
nduca@chromium.org [Sat, 19 Apr 2014 05:30:54 +0000 (05:30 +0000)]
Only load the test suite needed to run the selected test

When clicking a hyperlink, we used to load all the tests before
figuring out which test to load. This means loading pretty much
all the JS reachable by trace viewer, which of course, is a bit overkill.

This runs just the test suite, yielding much faster reload times.

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1262 0e6d7f2b-9903-5b78-7403-59d27f066143

4 days agoCleanup time summary data before handing to the pie chart
nduca@chromium.org [Sat, 19 Apr 2014 02:52:23 +0000 (02:52 +0000)]
Cleanup time summary data before handing to the pie chart

The time summary data can end up with a lot of small records,
which don't show well in the pie chart. Group them into an 'other' bin.

As part of this, add a common library for stats in tvcm.

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1261 0e6d7f2b-9903-5b78-7403-59d27f066143

4 days agoDon't create value labels for narrow pie slices
nduca@chromium.org [Fri, 18 Apr 2014 20:43:17 +0000 (20:43 +0000)]
Don't create value labels for narrow pie slices

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1260 0e6d7f2b-9903-5b78-7403-59d27f066143

4 days agoInclude titleWidth in minSize computation
nduca@chromium.org [Fri, 18 Apr 2014 20:43:11 +0000 (20:43 +0000)]
Include titleWidth in minSize computation

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1259 0e6d7f2b-9903-5b78-7403-59d27f066143

4 days agoAdd tvcm.ui.isElementAttachedToDocument and use in pie chart
nduca@chromium.org [Fri, 18 Apr 2014 20:43:05 +0000 (20:43 +0000)]
Add tvcm.ui.isElementAttachedToDocument and use in pie chart

PieChart minsize is unknowable if not attached, so assert that it is.

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1258 0e6d7f2b-9903-5b78-7403-59d27f066143

4 days agoRecognize cc::RasterTask and cc::AnalyzeTask
nduca@chromium.org [Fri, 18 Apr 2014 17:57:38 +0000 (17:57 +0000)]
Recognize cc::RasterTask and cc::AnalyzeTask

This pairs with
https://codereview.chromium.org/242523002
which should stabilize naming of this event for good.

TBR=reveman@chromium.org

Review URL: https://codereview.appspot.com/89380043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1257 0e6d7f2b-9903-5b78-7403-59d27f066143

5 days agoPut (g) after layers using gpu rasterization to make them stand out more
nduca@chromium.org [Fri, 18 Apr 2014 00:37:58 +0000 (00:37 +0000)]
Put (g) after layers using gpu rasterization to make them stand out more

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1256 0e6d7f2b-9903-5b78-7403-59d27f066143

5 days agoUse new lthi cats and gzip it
nduca@chromium.org [Fri, 18 Apr 2014 00:37:39 +0000 (00:37 +0000)]
Use new lthi cats and gzip it

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1255 0e6d7f2b-9903-5b78-7403-59d27f066143

5 days agoFix time summary side panel unit tests after cpuDuration rename
nduca@chromium.org [Thu, 17 Apr 2014 23:05:29 +0000 (23:05 +0000)]
Fix time summary side panel unit tests after cpuDuration rename

TBR=fmeawad

Review URL: https://codereview.appspot.com/89180043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1254 0e6d7f2b-9903-5b78-7403-59d27f066143

5 days agoAdd manual autosizing pie chart to keep its size sane
nduca@chromium.org [Thu, 17 Apr 2014 23:04:17 +0000 (23:04 +0000)]
Add manual autosizing pie chart to keep its size sane

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1253 0e6d7f2b-9903-5b78-7403-59d27f066143

5 days agoFix width and height setters on charts
nduca@chromium.org [Thu, 17 Apr 2014 23:03:57 +0000 (23:03 +0000)]
Fix width and height setters on charts

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1252 0e6d7f2b-9903-5b78-7403-59d27f066143

5 days agoMake lines a bit more visible in pie chart
nduca@chromium.org [Thu, 17 Apr 2014 23:03:49 +0000 (23:03 +0000)]
Make lines a bit more visible in pie chart

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1251 0e6d7f2b-9903-5b78-7403-59d27f066143

5 days agoRecognize the latest RasterTaskImpl names
nduca@chromium.org [Thu, 17 Apr 2014 21:12:34 +0000 (21:12 +0000)]
Recognize the latest RasterTaskImpl names

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1250 0e6d7f2b-9903-5b78-7403-59d27f066143

5 days agoReport num tests run
nduca@chromium.org [Thu, 17 Apr 2014 20:39:34 +0000 (20:39 +0000)]
Report num tests run

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1249 0e6d7f2b-9903-5b78-7403-59d27f066143

5 days agoModify pie chart to use splay format
nduca@chromium.org [Thu, 17 Apr 2014 19:47:11 +0000 (19:47 +0000)]
Modify pie chart to use splay format

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1248 0e6d7f2b-9903-5b78-7403-59d27f066143

6 days agoFix animation bound quads and selection.
avallee@chromium.org [Wed, 16 Apr 2014 20:54:30 +0000 (20:54 +0000)]
Fix animation bound quads and selection.

Note: this code currently displays a border around the layer but when selected,
the quad is transformed similarly to the layer.

BUG=517
R=nduca@chromium.org

Review URL: https://codereview.appspot.com/79520043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1247 0e6d7f2b-9903-5b78-7403-59d27f066143

11 days agoRename Duration -> Wall Duration, ThreadDuration -> CPU Duration
fmeawad@chromium.org [Sat, 12 Apr 2014 01:35:17 +0000 (01:35 +0000)]
Rename Duration -> Wall Duration, ThreadDuration -> CPU Duration

BUG=trace-viewer:538
R=nduca@chromium.org

Review URL: https://codereview.appspot.com/79590043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1246 0e6d7f2b-9903-5b78-7403-59d27f066143

11 days agoFix v8 log importer tests after moving to the new Stack sample model
fmeawad@chromium.org [Sat, 12 Apr 2014 00:41:49 +0000 (00:41 +0000)]
Fix v8 log importer tests after moving to the new Stack sample model

BUG=trace-viewer:546

TBR=nduca@chromium.org

Review URL: https://codereview.appspot.com/87210043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1245 0e6d7f2b-9903-5b78-7403-59d27f066143

12 days agoInitial implementation of CPU profiling features in trace_model
nduca@chromium.org [Fri, 11 Apr 2014 00:19:38 +0000 (00:19 +0000)]
Initial implementation of CPU profiling features in trace_model

BUG=545
TBR=nduca

Review URL: https://codereview.appspot.com/85670045

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1244 0e6d7f2b-9903-5b78-7403-59d27f066143

12 days agoEven better handling of null trackview
nduca@chromium.org [Thu, 10 Apr 2014 20:20:33 +0000 (20:20 +0000)]
Even better handling of null trackview

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1243 0e6d7f2b-9903-5b78-7403-59d27f066143

12 days agoFix exceptions that arise syncing interestRange during viewport changes
nduca@chromium.org [Thu, 10 Apr 2014 20:18:08 +0000 (20:18 +0000)]
Fix exceptions that arise syncing interestRange during viewport changes

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1242 0e6d7f2b-9903-5b78-7403-59d27f066143

12 days agoUpdate skps so that tests pass again
nduca@chromium.org [Thu, 10 Apr 2014 20:18:04 +0000 (20:18 +0000)]
Update skps so that tests pass again

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1241 0e6d7f2b-9903-5b78-7403-59d27f066143

2 weeks agoRename CounterSeries.addSample->CounterSeries.addCounterSample
nduca@chromium.org [Tue, 8 Apr 2014 20:13:49 +0000 (20:13 +0000)]
Rename CounterSeries.addSample->CounterSeries.addCounterSample

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1240 0e6d7f2b-9903-5b78-7403-59d27f066143

2 weeks agoFix run_tests
nduca@chromium.org [Tue, 8 Apr 2014 17:39:04 +0000 (17:39 +0000)]
Fix run_tests

BrowserController.stdout_enabled property was not written correctly.
This caused SetUp to fail, which then led to teardown to be skipped
because of how Run() was written.

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1239 0e6d7f2b-9903-5b78-7403-59d27f066143

2 weeks agoRecover correctly when selection changes without a chart
nduca@chromium.org [Tue, 8 Apr 2014 17:38:49 +0000 (17:38 +0000)]
Recover correctly when selection changes without a chart

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1238 0e6d7f2b-9903-5b78-7403-59d27f066143

2 weeks agoHook up interest region to timeline side panel
nduca@chromium.org [Tue, 8 Apr 2014 07:39:33 +0000 (07:39 +0000)]
Hook up interest region to timeline side panel

This causes the side panel to analyze only the interest region.

TBR=nduca

Review URL: https://codereview.appspot.com/85280043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1237 0e6d7f2b-9903-5b78-7403-59d27f066143

2 weeks agoTurn TimelineViewport.markers -> TimelineInterestRange
nduca@chromium.org [Tue, 8 Apr 2014 06:58:34 +0000 (06:58 +0000)]
Turn TimelineViewport.markers -> TimelineInterestRange

For years, Timeline has had a concept of a marker. This grew from the idea of
having vertical lines that can be added by users to indicate interesting items.
It was designed for an arbitrary number of markers, but then was retrofitted to
specially draw the case of 2 by darkening the area outside that 2-item range.
This ended up being the most common use case and organic bugs crept in for the
>2 use case.

This gets rid of the concept of >2 markers and introduces the idea of an
interest range which is either empty, or if on, has a min and a max. We
envision using this interest range more actively throughout the UI: by it being
a pure range, it becomes a lot easier to build UI around. Followup patches will
start using the interest range.

TBR=nduca

Review URL: https://codereview.appspot.com/84990043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1236 0e6d7f2b-9903-5b78-7403-59d27f066143

2 weeks agoTimeSummary UX tweaks
nduca@chromium.org [Fri, 4 Apr 2014 00:26:03 +0000 (00:26 +0000)]
TimeSummary UX tweaks

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1234 0e6d7f2b-9903-5b78-7403-59d27f066143

2 weeks agoFix gjslint script and lint that resulted from it being off
nduca@chromium.org [Fri, 4 Apr 2014 00:25:53 +0000 (00:25 +0000)]
Fix gjslint script and lint that resulted from it being off

When src was renamed to trace_viewer, the gjslint stopped working in all cases.
This restores it and fixes the lint that grew during the time when it was
broken.

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1233 0e6d7f2b-9903-5b78-7403-59d27f066143

2 weeks agoFix analysis view resizing
nduca@chromium.org [Thu, 3 Apr 2014 18:09:52 +0000 (18:09 +0000)]
Fix analysis view resizing

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1232 0e6d7f2b-9903-5b78-7403-59d27f066143

2 weeks agoBasic thread_times panel
nduca@chromium.org [Thu, 3 Apr 2014 01:34:22 +0000 (01:34 +0000)]
Basic thread_times panel

This begins to automate the visualizations @epenner does for the thread times team, right inside tracing.

Example result for theverge.trace:
https://dl.dropboxusercontent.com/u/58819336/ThreadTimesDemo.png

CC=epenner@chromium.org,miletus,fmeawad

Review URL: https://codereview.appspot.com/83050043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1231 0e6d7f2b-9903-5b78-7403-59d27f066143

2 weeks agoRemove accidental debugger statements
nduca@chromium.org [Wed, 2 Apr 2014 21:57:27 +0000 (21:57 +0000)]
Remove accidental debugger statements

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1230 0e6d7f2b-9903-5b78-7403-59d27f066143

2 weeks agoDont guard export with try/catch
nduca@chromium.org [Wed, 2 Apr 2014 21:55:52 +0000 (21:55 +0000)]
Dont guard export with try/catch

Now that we have toplevel error handling, we can catch this directly
by the unittest system.

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1229 0e6d7f2b-9903-5b78-7403-59d27f066143

2 weeks agoIncrease robustness of tvcm to module loading and other global failures
nduca@chromium.org [Wed, 2 Apr 2014 21:54:18 +0000 (21:54 +0000)]
Increase robustness of tvcm to module loading and other global failures

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1228 0e6d7f2b-9903-5b78-7403-59d27f066143

3 weeks agoIntroduce TimelineViewSidePanel
nduca@chromium.org [Tue, 1 Apr 2014 19:43:21 +0000 (19:43 +0000)]
Introduce TimelineViewSidePanel

SidePanelContainer sits to the right of the regular timeline, and lets any part
of tracing add in a side-view to that panel. With followup patches, this can be
used to add domain-specific replacements or helper-tools for navigating through
the timeline. As part of this, had to clean up how selectors for the profiling and timeline view were written.

Collapsed: https://dl.dropboxusercontent.com/u/58819336/SidePanelExample.png

Expanded:
https://dl.dropboxusercontent.com/u/58819336/PanelExampleExpanded.png

Supports multiple panels, of course. :)

R=dsinclair@chromium.org, dsinclair
CC=miletus

Review URL: https://codereview.appspot.com/82990044

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1227 0e6d7f2b-9903-5b78-7403-59d27f066143

3 weeks agoPrint diagnostic information when css linting fails
nduca@chromium.org [Tue, 1 Apr 2014 06:08:43 +0000 (06:08 +0000)]
Print diagnostic information when css linting fails

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1226 0e6d7f2b-9903-5b78-7403-59d27f066143

3 weeks agoMore cleanups from palette changes
nduca@chromium.org [Tue, 1 Apr 2014 06:00:44 +0000 (06:00 +0000)]
More cleanups from palette changes

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1225 0e6d7f2b-9903-5b78-7403-59d27f066143

3 weeks agoPrettify test runner URLs
nduca@chromium.org [Tue, 1 Apr 2014 06:00:37 +0000 (06:00 +0000)]
Prettify test runner URLs

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1224 0e6d7f2b-9903-5b78-7403-59d27f066143

3 weeks agoRemove accidentally added file
nduca@chromium.org [Mon, 31 Mar 2014 05:51:00 +0000 (05:51 +0000)]
Remove accidentally added file

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1223 0e6d7f2b-9903-5b78-7403-59d27f066143

3 weeks agoAdd getUsingPath
nduca@chromium.org [Mon, 31 Mar 2014 05:50:12 +0000 (05:50 +0000)]
Add getUsingPath

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1222 0e6d7f2b-9903-5b78-7403-59d27f066143

3 weeks agoMove the rest of telemetry.web_components.ui into tvcm.ui
nduca@chromium.org [Sun, 30 Mar 2014 02:31:55 +0000 (02:31 +0000)]
Move the rest of telemetry.web_components.ui into tvcm.ui

TBR=dsinclair

Review URL: https://codereview.appspot.com/81360049

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1221 0e6d7f2b-9903-5b78-7403-59d27f066143

3 weeks agoUpdate shadowDOM usage to latest spec
nduca@chromium.org [Sun, 30 Mar 2014 02:12:41 +0000 (02:12 +0000)]
Update shadowDOM usage to latest spec

BUG=541
TBR=dsinclair

Review URL: https://codereview.appspot.com/82240043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1220 0e6d7f2b-9903-5b78-7403-59d27f066143

3 weeks agoFix a few lingering problems with the color palette movement patch
nduca@chromium.org [Sun, 30 Mar 2014 02:09:10 +0000 (02:09 +0000)]
Fix a few lingering problems with the color palette movement patch

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1219 0e6d7f2b-9903-5b78-7403-59d27f066143

3 weeks agoMove color_pallette to tvcm.ui
nduca@chromium.org [Sun, 30 Mar 2014 01:51:47 +0000 (01:51 +0000)]
Move color_pallette to tvcm.ui

The chart system was added to tvcm.ui, but it pulled in tracing, which
is a layering violation. This moves the dependency on color palette
up to tvcm.ui and updates references accordingly.

TBR=dsinclair

Review URL: https://codereview.appspot.com/82210044

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1218 0e6d7f2b-9903-5b78-7403-59d27f066143

3 weeks agoSort async/flow event by sequence number when timestamps are the same.
miletus@chromium.org [Thu, 27 Mar 2014 19:37:08 +0000 (19:37 +0000)]
Sort async/flow event by sequence number when timestamps are the same.

This ensures that we process async/flow events in the trace file
order when the clock fails to advance.

BUG=338826
R=nduca@chromium.org

Review URL: https://codereview.appspot.com/80920044

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1216 0e6d7f2b-9903-5b78-7403-59d27f066143

3 weeks agoMake GPU-rasterized layers more visible in frame viewer
ajuma@chromium.org [Thu, 27 Mar 2014 17:34:52 +0000 (17:34 +0000)]
Make GPU-rasterized layers more visible in frame viewer

This makes GPU-rasterized layers have a thicker border, and also scales
border width by the device pixel ratio.

BUG=chromium:353130
R=nduca@chromium.org

Review URL: https://codereview.appspot.com/81460044

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1214 0e6d7f2b-9903-5b78-7403-59d27f066143

4 weeks agoExpose MIN_MOUSE_SELECTION_DISTANCE to fix timing mode
fmeawad@chromium.org [Fri, 21 Mar 2014 01:12:16 +0000 (01:12 +0000)]
Expose MIN_MOUSE_SELECTION_DISTANCE to fix timing mode

BUG=trace-viewer:527
R=nduca@chromium.org

Review URL: https://codereview.appspot.com/78520043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1212 0e6d7f2b-9903-5b78-7403-59d27f066143

4 weeks agoAdd telemetry bar chart widget.
dsinclair@chromium.org [Thu, 20 Mar 2014 20:21:00 +0000 (20:21 +0000)]
Add telemetry bar chart widget.

This copies the bar chart widget (and supporting files) from Telemetry into
the TVCM repo.

BUG=
TBR=nduca@chromium.org

Review URL: https://codereview.appspot.com/78420043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1211 0e6d7f2b-9903-5b78-7403-59d27f066143

4 weeks agoAllow following flow event arcs with shift-arrow keys.
dsinclair@chromium.org [Thu, 20 Mar 2014 16:49:47 +0000 (16:49 +0000)]
Allow following flow event arcs with shift-arrow keys.

Currently the arrow keys will move to the next slice in a given track. If we're
on a flow event arc we usually want to move to the next item in the flow. This
CL changes the behaviour of the shift-arrow keys to move through flows if you
have a flow event as your starting point.

BUG=trace-viewer:536, trace-viewer:246
R=nduca@chromium.org

Review URL: https://codereview.appspot.com/77780043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1209 0e6d7f2b-9903-5b78-7403-59d27f066143

4 weeks agoMake GPU-rasterized layers have a different border color
ajuma@chromium.org [Wed, 19 Mar 2014 17:25:23 +0000 (17:25 +0000)]
Make GPU-rasterized layers have a different border color

This makes GPU-rasterized layers have a yellow-green
border. This also adds text identifying GPU rasterized
layers when such layers are selected.

BUG=353130
R=nduca@chromium.org

Review URL: https://codereview.appspot.com/77480044

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1208 0e6d7f2b-9903-5b78-7403-59d27f066143

5 weeks agoSkip scheme prefix in traceviewer when not needed.
bratell@opera.com [Fri, 14 Mar 2014 07:24:22 +0000 (07:24 +0000)]
Skip scheme prefix in traceviewer when not needed.

BUG=
R=nduca@chromium.org

Review URL: https://codereview.appspot.com/74820044

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1206 0e6d7f2b-9903-5b78-7403-59d27f066143

5 weeks agoFix the presubmit (upload) script.
etienneb@chromium.org [Wed, 12 Mar 2014 12:09:53 +0000 (12:09 +0000)]
Fix the presubmit (upload) script.

R=nduca@chromium.org, nduca

Since the refactoring to move the traceviewer into its folder, the presumit
tests are broken. This CL added all python script into the banned list and
also the 'build' folder.

** Presubmit ERRORS **
Entries in trace_viewer.gyp do not match files on disk:
  On disk only:
    trace_viewer\__init__.py
    trace_viewer\build\__init__.py
    trace_viewer\build\benchmarks.py
    trace_viewer\build\check_gyp.py
    trace_viewer\build\fixjsstyle
    trace_viewer\build\fixjsstyle.py
    trace_viewer\build\generate_about_tracing_contents
    trace_viewer\build\generate_about_tracing_contents.py
    trace_viewer\build\generate_about_tracing_contents_unittest.py
    trace_viewer\build\generate_standalone_timeline_view
    trace_viewer\build\generate_standalone_timeline_view.py
    trace_viewer\build\generate_standalone_timeline_view_unittest.py
    trace_viewer\build\gjslint
    trace_viewer\build\trace2html.js
    trace_viewer\build\trace2html.py
    trace_viewer\build\trace2html_unittest.py
    trace_viewer\trace_viewer_project.py
    trace_viewer\trace_viewer_unittest.py

BUG=

Review URL: https://codereview.appspot.com/72930044

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1205 0e6d7f2b-9903-5b78-7403-59d27f066143

6 weeks agoBetter exception when template creation fails
nduca@chromium.org [Sat, 8 Mar 2014 03:42:09 +0000 (03:42 +0000)]
Better exception when template creation fails

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1204 0e6d7f2b-9903-5b78-7403-59d27f066143

6 weeks agoA few small fixes after big rename
nduca@chromium.org [Fri, 7 Mar 2014 11:15:23 +0000 (11:15 +0000)]
A few small fixes after big rename

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1203 0e6d7f2b-9903-5b78-7403-59d27f066143

6 weeks agoSpeed up deps generation by huge amounts
nduca@chromium.org [Fri, 7 Mar 2014 11:10:16 +0000 (11:10 +0000)]
Speed up deps generation by huge amounts

cProfile indicated that the vast majority of our time is spent
stripping js comment in order to figure out if it is a tvcm module,
and then later to parse the module's dependencies.

This patch adds:
- caching of the stripped results
- re.search for tokenization
- 4096 bytes maxed used for all js
- uses string funcs when possible
- moves dotfile checking up
- fixes N^2 bug in ComputeLoadSequenceRecursive

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1202 0e6d7f2b-9903-5b78-7403-59d27f066143

6 weeks agoLint fix for module test case runner
nduca@chromium.org [Fri, 7 Mar 2014 08:21:36 +0000 (08:21 +0000)]
Lint fix for module test case runner

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1201 0e6d7f2b-9903-5b78-7403-59d27f066143

6 weeks agoMove gjslint helper script into a reusable module
nduca@chromium.org [Fri, 7 Mar 2014 08:21:29 +0000 (08:21 +0000)]
Move gjslint helper script into a reusable module

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1200 0e6d7f2b-9903-5b78-7403-59d27f066143

6 weeks agoSkip js files from PRESUBMIT check that are obviously non-tvcm
nduca@chromium.org [Fri, 7 Mar 2014 08:21:24 +0000 (08:21 +0000)]
Skip js files from PRESUBMIT check that are obviously non-tvcm

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1199 0e6d7f2b-9903-5b78-7403-59d27f066143

6 weeks agoAllow other_paths to be passed into TraceViewerProject
nduca@chromium.org [Fri, 7 Mar 2014 08:21:19 +0000 (08:21 +0000)]
Allow other_paths to be passed into TraceViewerProject

This allows external embedders to subclass TraceViewerProject and thus
use trace viewer.

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1198 0e6d7f2b-9903-5b78-7403-59d27f066143

6 weeks agoMove src->trace_viewer and build->trace_viewer/build
nduca@chromium.org [Fri, 7 Mar 2014 08:14:58 +0000 (08:14 +0000)]
Move src->trace_viewer and build->trace_viewer/build

We need to use trace_viewer as a module to embed it in other projects.
This means that having a module laying around called "src" and "build" is
prone to conflicts (and does conflict, Android scripts for Chrome have a
build module). The solution is to put all trace_viewer python code that
is not related to tvcm into the trace_viewer folder, and add an __init__.py
so that it behaves exactly as one would expect.

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1197 0e6d7f2b-9903-5b78-7403-59d27f066143

6 weeks agoFix subclassing with namespaced elements
nduca@chromium.org [Fri, 7 Mar 2014 08:14:37 +0000 (08:14 +0000)]
Fix subclassing with namespaced elements

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1196 0e6d7f2b-9903-5b78-7403-59d27f066143

6 weeks agopatch from issue 72140044
nduca@chromium.org [Fri, 7 Mar 2014 01:25:16 +0000 (01:25 +0000)]
patch from issue 72140044

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1195 0e6d7f2b-9903-5b78-7403-59d27f066143

6 weeks agoForce end recording when start recording
wangxianzhu@chromium.org [Wed, 5 Mar 2014 19:24:36 +0000 (19:24 +0000)]
Force end recording when start recording

When the user reloads the about:tracing page when we are recording,
we try to end recording in window.onbeforeunload. However, the handler
won't be reliably called, leaving recording not ended, causing error
when 'Record' button is pressed.

Now force end recording when start recording.

BUG=chromium:349376
TEST=about_tracing.tracing_ui_client_test.fullRecording
TEST=about_tracing.profiling_view_test.recording
R=nduca@chromium.org

Review URL: https://codereview.appspot.com/71680043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1194 0e6d7f2b-9903-5b78-7403-59d27f066143

6 weeks agoSpecify utf8 on trace-viewer html files
nduca@chromium.org [Wed, 5 Mar 2014 19:05:39 +0000 (19:05 +0000)]
Specify utf8 on trace-viewer html files

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1193 0e6d7f2b-9903-5b78-7403-59d27f066143

7 weeks agoAllow tvcm.testSuite to define a testSuite to help with 80col
nduca@chromium.org [Wed, 5 Mar 2014 04:25:27 +0000 (04:25 +0000)]
Allow tvcm.testSuite to define a testSuite to help with 80col

In an 80col coding environment, base.unittest.testSuite eats up a lot of those
80 characters. Problematically, if it gets too long, then the wrapping causes
the test body to then be indented even more, exacerbating the problem in the
actual test implementations.

This lets you define a test suite as tvcm.testSuite(bodyFn).

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1192 0e6d7f2b-9903-5b78-7403-59d27f066143

7 weeks agoAvoid memory allocation with getEventHandler in EtwImporter.
etienneb@chromium.org [Tue, 4 Mar 2014 14:54:11 +0000 (14:54 +0000)]
Avoid memory allocation with getEventHandler in EtwImporter.

R=nduca@chromium.org, nduca

BUG=

Review URL: https://codereview.appspot.com/70150043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1191 0e6d7f2b-9903-5b78-7403-59d27f066143

7 weeks agoAdd decoding of EventTrace event to get trace information.
etienneb@chromium.org [Tue, 4 Mar 2014 14:49:54 +0000 (14:49 +0000)]
Add decoding of EventTrace event to get trace information.

The decoding of the first event (EventTrace:Header) is needed to detect
if the trace is a 32-bit or 64-bit version.

Originaly, this was propagate into the event header, but this rely on
code on the chrome side, which I pefer to keep as simple as possible.

R=nduca@chromium.org, nduca

BUG=

Review URL: https://codereview.appspot.com/70910043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1190 0e6d7f2b-9903-5b78-7403-59d27f066143

7 weeks agoAdd decoding of Process and Thread Events into EtwImporter.
etienneb@chromium.org [Tue, 4 Mar 2014 14:37:38 +0000 (14:37 +0000)]
Add decoding of Process and Thread Events into EtwImporter.

As Javascript doesn't support 64 bit numeric, they are now kept as a
string. This should not be an issue as they aren't manipulate.

R=nduca@chromium.org, fdoray, nduca

BUG=

Review URL: https://codereview.appspot.com/69110044

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1189 0e6d7f2b-9903-5b78-7403-59d27f066143

7 weeks agoFix skipped occurence column
fmeawad@chromium.org [Fri, 28 Feb 2014 02:14:21 +0000 (02:14 +0000)]
Fix skipped occurence column

BUG=528
R=nduca@chromium.org

Review URL: https://codereview.appspot.com/69810043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1188 0e6d7f2b-9903-5b78-7403-59d27f066143

7 weeks agotrace2html needs to include cc and other about_tracing features
nduca@chromium.org [Thu, 27 Feb 2014 00:16:11 +0000 (00:16 +0000)]
trace2html needs to include cc and other about_tracing features

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1187 0e6d7f2b-9903-5b78-7403-59d27f066143

7 weeks agoShift to zero to avoid rendering artefacts in example trace_viewer
nduca@chromium.org [Wed, 26 Feb 2014 22:49:37 +0000 (22:49 +0000)]
Shift to zero to avoid rendering artefacts in example trace_viewer

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1186 0e6d7f2b-9903-5b78-7403-59d27f066143

7 weeks agoTeach raster_task_slice_view about new raster task names
nduca@chromium.org [Wed, 26 Feb 2014 22:49:32 +0000 (22:49 +0000)]
Teach raster_task_slice_view about new raster task names

CC=reveman,vmpstr

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1185 0e6d7f2b-9903-5b78-7403-59d27f066143

7 weeks agoPlug the Thread and Process parser into the EtwImporter.
etienneb@chromium.org [Wed, 26 Feb 2014 15:58:30 +0000 (15:58 +0000)]
Plug the Thread and Process parser into the EtwImporter.

R=nduca@chromium.org, nduca

Review URL: https://codereview.appspot.com/68930043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1184 0e6d7f2b-9903-5b78-7403-59d27f066143

7 weeks agoAdd threads and processes manipulation methods into ETWImporter.
etienneb@chromium.org [Wed, 26 Feb 2014 15:33:06 +0000 (15:33 +0000)]
Add threads and processes manipulation methods into ETWImporter.

R=fdoray@chromium.org, nduca@chromium.org, fdoray, nduca

BUG=

Review URL: https://codereview.appspot.com/68220043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1183 0e6d7f2b-9903-5b78-7403-59d27f066143

7 weeks agoAdd decoding of aggregate structures into EtwImporter.
etienneb@chromium.org [Wed, 26 Feb 2014 15:20:15 +0000 (15:20 +0000)]
Add decoding of aggregate structures into EtwImporter.

R=nduca@chromium.org, dsinclair, fdoray, nduca

BUG=

Review URL: https://codereview.appspot.com/68650043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1182 0e6d7f2b-9903-5b78-7403-59d27f066143

7 weeks agoImplements the decoder methods for basic types.
etienneb@chromium.org [Wed, 26 Feb 2014 15:13:14 +0000 (15:13 +0000)]
Implements the decoder methods for basic types.

These methods will be used by the event-specifics parser to decode
payload into a set of fields.

R=fdoray@chromium.org, nduca@chromium.org, fdoray, nduca

BUG=

Review URL: https://codereview.appspot.com/66730050

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1181 0e6d7f2b-9903-5b78-7403-59d27f066143

8 weeks agoDont spam console with temp filename when running tests
nduca@chromium.org [Wed, 26 Feb 2014 05:27:13 +0000 (05:27 +0000)]
Dont spam console with temp filename when running tests

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1180 0e6d7f2b-9903-5b78-7403-59d27f066143

8 weeks agoExplicitly wait for load
nduca@chromium.org [Wed, 26 Feb 2014 04:14:29 +0000 (04:14 +0000)]
Explicitly wait for load

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1179 0e6d7f2b-9903-5b78-7403-59d27f066143

8 weeks agoImprove error messages reported when browser finding fails.
nduca@chromium.org [Wed, 26 Feb 2014 04:14:23 +0000 (04:14 +0000)]
Improve error messages reported when browser finding fails.

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1178 0e6d7f2b-9903-5b78-7403-59d27f066143

8 weeks agoRe-raise errors that happened during browser start after closing the browser
nduca@chromium.org [Wed, 26 Feb 2014 03:56:23 +0000 (03:56 +0000)]
Re-raise errors that happened during browser start after closing the browser

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1177 0e6d7f2b-9903-5b78-7403-59d27f066143

8 weeks agoInitialize fields earlier to handle failures better.
nduca@chromium.org [Wed, 26 Feb 2014 03:53:56 +0000 (03:53 +0000)]
Initialize fields earlier to handle failures better.

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1176 0e6d7f2b-9903-5b78-7403-59d27f066143

8 weeks agoAllow --browser to be passed to run_tests
nduca@chromium.org [Wed, 26 Feb 2014 03:06:18 +0000 (03:06 +0000)]
Allow --browser to be passed to run_tests

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1175 0e6d7f2b-9903-5b78-7403-59d27f066143

8 weeks agoNeed to awit on window.tvcm instead of an unbound global
nduca@chromium.org [Wed, 26 Feb 2014 02:53:50 +0000 (02:53 +0000)]
Need to awit on window.tvcm instead of an unbound global

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1174 0e6d7f2b-9903-5b78-7403-59d27f066143

8 weeks agoNeed to handle base_types on implicit snapshots as well
nduca@chromium.org [Wed, 26 Feb 2014 02:01:21 +0000 (02:01 +0000)]
Need to handle base_types on implicit snapshots as well

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1173 0e6d7f2b-9903-5b78-7403-59d27f066143

8 weeks agoAdd __call__ to ModuleTestSuite to try to fix Win failures.
nduca@chromium.org [Tue, 25 Feb 2014 10:48:23 +0000 (10:48 +0000)]
Add __call__ to ModuleTestSuite to try to fix Win failures.

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1172 0e6d7f2b-9903-5b78-7403-59d27f066143

8 weeks agoImprove EvaluateThennableAndWait to give better errors on failure
nduca@chromium.org [Tue, 25 Feb 2014 09:26:09 +0000 (09:26 +0000)]
Improve EvaluateThennableAndWait to give better errors on failure

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1171 0e6d7f2b-9903-5b78-7403-59d27f066143

8 weeks agoFix newlines at end of discovery exception printing
nduca@chromium.org [Tue, 25 Feb 2014 09:04:20 +0000 (09:04 +0000)]
Fix newlines at end of discovery exception printing

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1170 0e6d7f2b-9903-5b78-7403-59d27f066143

8 weeks agoYet more deflake of test_case_runner loading
nduca@chromium.org [Tue, 25 Feb 2014 09:02:14 +0000 (09:02 +0000)]
Yet more deflake of test_case_runner loading

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1169 0e6d7f2b-9903-5b78-7403-59d27f066143

8 weeks agotrace2html: gzip-then-b64encode the data for smaller traces
nduca@chromium.org [Tue, 25 Feb 2014 06:37:49 +0000 (06:37 +0000)]
trace2html: gzip-then-b64encode the data for smaller traces

The bootstrap base64-decodes the result before importing. The stock
gzip importer miraculuously handles the rest.

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1168 0e6d7f2b-9903-5b78-7403-59d27f066143

8 weeks agoShift world to zero when importing traces
nduca@chromium.org [Tue, 25 Feb 2014 05:54:08 +0000 (05:54 +0000)]
Shift world to zero when importing traces

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1167 0e6d7f2b-9903-5b78-7403-59d27f066143

8 weeks agoPrint diagnostic information on discovery failure
nduca@chromium.org [Tue, 25 Feb 2014 05:43:09 +0000 (05:43 +0000)]
Print diagnostic information on discovery failure

When test discovery fails in tvcm, no stack trace was printed. This
adds a full dump of the stack to help understand the failure better.

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1166 0e6d7f2b-9903-5b78-7403-59d27f066143

8 weeks agoAllow object snapshotting to modify object name
nduca@chromium.org [Tue, 25 Feb 2014 03:46:49 +0000 (03:46 +0000)]
Allow object snapshotting to modify object name

We often have situations like the following that we want to trace:
  class Foo {
  }
  class FooSub : public Foo {
  }

In these cases, we typically register a custom handler for FooSub so that it can
have a custom js-side class for handling the FooSub data. This is done by
tracing the FooSub object with a different name, e.g.:
  ts=0 ph=N name=FooSub
  ts=1 ph=O name=FooSub args={snapshot:{...foosub as value...}}
  ts=2 ph=D name=FooSub

This seems plausible, until you consider the problem of determining the name of
FooSub for the N and D calls. Conceptually, one wants to do this:
  class Foo {
    Foo() { /* issue ph=N with GetTypeName() */ }
    ~Foo() { /* issue ph=D with GetTypeName() */ }
    virtual const char* GetTypeName() { return "Foo"; }
  }
  class FooSub : public Foo {
    virtual const char* GetTypeName() { return "FooSub”; }
    void Snapshot() { /* issue ph=o with name=GetTypeName() */ }
  }

The problem here is Foo::Foo and Foo::~Foo(): you cannot call GetTypeName from
the base during construction. The solution to this is to add base_type to the
snapshot:
  ts=0 ph=N name=Foo
  ts=1 ph=O name=FooSub args={snapshot:{
    base_type=Foo
    ...foosub as value...
  }}
  ts=2 ph=D name=Foo

This stream changes the object name from Foo to FooSub on the first snapshot,
and then verifies from that point on allows the FooSub to be deleted by its base
type name, Foo. This enables instrumentation of the following form:

  class Foo {
    Foo() { /* issue ph=N with name="Foo" */ }
    ~Foo() { /* issue ph=D with name="Foo" */ }
    virtual const char* GetTypeName() { return "Foo"; }
  }
  class FooSub : public Foo {
    virtual const char* GetTypeName() { return "FooSub”; }
    void Snapshot() {
       /* issue ph=o with name=GetTypeName()
        * and args={base_type="Foo",
        *           ...rest of FooSub as value ...}
        */
    }
  }
BUG=526

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1165 0e6d7f2b-9903-5b78-7403-59d27f066143

8 weeks agoUse toString() to set name of created functions instead of overriding their name
nduca@chromium.org [Tue, 25 Feb 2014 03:46:45 +0000 (03:46 +0000)]
Use toString() to set name of created functions instead of overriding their name

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1164 0e6d7f2b-9903-5b78-7403-59d27f066143

2 months agoAdd trace2html script and module
nduca@chromium.org [Fri, 21 Feb 2014 08:23:14 +0000 (08:23 +0000)]
Add trace2html script and module

This generates a standalone html file that combines a trace and
the css/js/etc of the trace_viewer. This is like systrace but for any
trace file.

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1163 0e6d7f2b-9903-5b78-7403-59d27f066143

2 months agoShare navigation code between test execution and discovery
nduca@chromium.org [Fri, 21 Feb 2014 07:09:15 +0000 (07:09 +0000)]
Share navigation code between test execution and discovery

The discovery code had a bunch of extra WaitFor calls to ensure the page had
fully loaded before running the tests. But, the test running code didn't have
these waits. This led to flake. This factors the waits to a common function
that both use.

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1162 0e6d7f2b-9903-5b78-7403-59d27f066143

2 months agoThis CL adds a importer/parser for ETW events.
etienneb@chromium.org [Thu, 20 Feb 2014 15:38:38 +0000 (15:38 +0000)]
This CL adds a importer/parser for ETW events.

In the current state, there is no parsing of any events.
An abstract class "Parser" is provided and must be specialized for each tracing facilities.

Event are produced by:
  https://codereview.chromium.org/171143002/

R=nduca@chromium.org

Review URL: https://codereview.appspot.com/51300043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1161 0e6d7f2b-9903-5b78-7403-59d27f066143

2 months agoFixes invalid paths when generating dependencies on Windows.
etienneb@chromium.org [Tue, 18 Feb 2014 21:43:53 +0000 (21:43 +0000)]
Fixes invalid paths when generating dependencies on Windows.

The generate.py script produces a javascript file to load the
dependencies. These dependencies are not properly escaped.

Uncaught Error: SyntaxError: Unexpected token ILLEGAL
    at ensureDepsLoaded (http://localhost:8003/tvcm/__init__.js:135:15)
    at Object.require (http://localhost:8003/tvcm/__init__.js:231:5)
    at http://localhost:8003/tvcm/tests.html:29:10

Here is a example of an invalid line containing the character: '\'.

"
[...]
tvcm.setResourceFileName('cc.picture_ops_list_view','cc\picture_ops_list_view.js');
tvcm.setResourceFileName('cc.selection','cc\selection.js');
[...]
"

When this is pass to the "eval" function in JS, an invalid token
exception is throw and the page stop working without drawing
anything.

R=nduca@chromium.org

Review URL: https://codereview.appspot.com/65000043

git-svn-id: http://trace-viewer.googlecode.com/svn/trunk@1160 0e6d7f2b-9903-5b78-7403-59d27f066143