Bug 28969 - Add "sampling profiler" preference, simplify data display when it's set
Summary: Add "sampling profiler" preference, simplify data display when it's set
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-04 05:22 PDT by Mikhail Naganov
Modified: 2009-09-04 14:11 PDT (History)
2 users (show)

See Also:


Attachments
Proposed change (2.69 KB, patch)
2009-09-04 05:26 PDT, Mikhail Naganov
timothy: review-
Details | Formatted Diff | Diff
Proposed change (2.69 KB, patch)
2009-09-04 08:43 PDT, Mikhail Naganov
timothy: review-
Details | Formatted Diff | Diff
Comment now addressed. (2.69 KB, patch)
2009-09-04 09:09 PDT, Mikhail Naganov
timothy: review-
Details | Formatted Diff | Diff
Indentation fixed (2.69 KB, patch)
2009-09-04 10:12 PDT, Mikhail Naganov
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Naganov 2009-09-04 05:22:53 PDT
When a sampling profiler is used, it differs from an instrumentation profiler in two ways:

- first, there is no data for 'calls count' and 'average call duration' data grid columns;
- second, displaying fractions of milliseconds is meaningless, because a sampling profiler can't provide such accuracy.

Thus, my proposal is to introduce a corresponding preference, and to update profiles panel code as necessary.
Comment 1 Mikhail Naganov 2009-09-04 05:26:37 PDT
Created attachment 39053 [details]
Proposed change
Comment 2 Timothy Hatcher 2009-09-04 07:28:05 PDT
Comment on attachment 39053 [details]
Proposed change

samplingCpuProfiler should be samplingCPUProfiler per our style guidlines.

>                      "function": { title: WebInspector.UIString("Function"), disclosure: true, sortable: true } };
> +    if (Preferences.samplingCpuProfiler) {
> +      delete columns.average;
> +      delete columns.calls;
> +    }

Add an empty line before the if.
Comment 3 Mikhail Naganov 2009-09-04 08:43:23 PDT
Created attachment 39059 [details]
Proposed change

Comment addressed
Comment 4 Timothy Hatcher 2009-09-04 09:00:18 PDT
Comment on attachment 39059 [details]
Proposed change

You missed my more important samplingCpuProfiler -> samplingCPUProfiler comment.
Comment 5 Mikhail Naganov 2009-09-04 09:09:03 PDT
Created attachment 39063 [details]
Comment now addressed.

Oh, I'm sorry. Yes, I've missed that line.
Comment 6 Timothy Hatcher 2009-09-04 09:10:41 PDT
Comment on attachment 39063 [details]
Comment now addressed.

Opps. Sorry I missed this earlier..

+    if (Preferences.samplingCPUProfiler) {
+      delete columns.average;
+      delete columns.calls;
+    }

You need to use 4 space indents.
Comment 7 Mikhail Naganov 2009-09-04 10:12:17 PDT
Created attachment 39073 [details]
Indentation fixed

Oh, I'm really really sorry. I should have different editor settings for WebKit patches.
Comment 8 Pavel Feldman 2009-09-04 14:11:51 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/inspector/front-end/ProfileDataGridTree.js
	M	WebCore/inspector/front-end/ProfileView.js
	M	WebCore/inspector/front-end/inspector.js
Committed r48074