Bug 28969

Summary: Add "sampling profiler" preference, simplify data display when it's set
Product: WebKit Reporter: Mikhail Naganov <mnaganov>
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: pfeldman, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed change
timothy: review-
Proposed change
timothy: review-
Comment now addressed.
timothy: review-
Indentation fixed timothy: review+

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