Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Issue 2028753002: Make Task Manager sort more meaningful (Closed)

Created:
4 years, 6 months ago by ncarter (slow)
Modified:
4 years, 6 months ago
Reviewers:
afakhry
CC:
chromium-reviews, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make Task Manager sort more meaningful: - Model order is now more meaningful: - Browser process is always first. - Gpu process is always second. - More generally, sorting of non-subtasks is done by process type, followed by tab id, and finally task ID. - Using tab ID puts "Tab:" rows rows in tab creation order, and provides preserves the row's position in the list even when a tab navigates cross-process (though not across prerendering) - Sorting by process type places the browser process first, the gpu process second, etc, in a way that's predictable. (sorting by task ID or pid resulted in an unpredictable ordering). - Subtasks (i.e. subframes) appear right after their parents. - Using task_id as a tiebreaker within a group of related tasks gives a predictable ordering, since this is effectively task-creation order. - Groups are kept on consecutive rows, as before. Within a group, rows are ordered by the same sort comparator that is used to sort between groups. - To effect the above sorting changes, the following tweaks to the TaskManager private interfaces are needed: - Expose a GetParentTask() method on Task. - TaskGroup switches to using an unsorted vector of Tasks. - Expose a Task ctor that supports overriding the pid, for use in unittests. This does not fix the UI problem where there's no way for the user to get back to the model order after sorting by any of the columns. A follow-on CL will need to address that. BUG=616897, 54909, 239611, 606985, 527455 TESTS=unit_tests, browser_tests Committed: https://crrev.com/0088a36baa443168daf851f3ccf95a2ad7090802 Cr-Commit-Position: refs/heads/master@{#401328}

Patch Set 1 #

Patch Set 2 : Add unittests. #

Patch Set 3 : Fix NaCl build. #

Patch Set 4 : Finish browsertest. #

Patch Set 5 : Remove unneeded assert #

Patch Set 6 : Add missing override. #

Patch Set 7 : Disable browsertest on OSX #

Patch Set 8 : Rework variable names. #

Patch Set 9 : More renaming. #

Patch Set 10 : Fix namespace issue, remove TODO. #

Patch Set 11 : Self review fixes. #

Patch Set 12 : Use a default argument instead of a second ctor. #

Total comments: 32

Patch Set 13 : Ahmed's fixes (& rebase) #

Patch Set 14 : Undo UI change for now, pending an official plan. #

Patch Set 15 : Fix unittest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+488 lines, -102 lines) Patch
M chrome/browser/task_management/providers/task.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +24 lines, -9 lines 0 comments Download
M chrome/browser/task_management/providers/task.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +14 lines, -6 lines 0 comments Download
M chrome/browser/task_management/providers/web_contents/subframe_task.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/task_management/providers/web_contents/subframe_task.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/task_management/sampling/task_group.h View 1 2 3 3 chunks +5 lines, -8 lines 0 comments Download
M chrome/browser/task_management/sampling/task_group.cc View 1 2 5 chunks +13 lines, -21 lines 0 comments Download
M chrome/browser/task_management/sampling/task_manager_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +90 lines, -12 lines 0 comments Download
A chrome/browser/task_management/sampling/task_manager_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +214 lines, -0 lines 0 comments Download
M chrome/browser/task_management/task_manager_browsertest.cc View 1 2 3 4 5 6 7 8 9 14 chunks +111 lines, -39 lines 0 comments Download
M chrome/browser/task_management/task_manager_interface.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +6 lines, -4 lines 0 comments Download
M chrome/browser/task_management/task_manager_observer.h View 1 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 26 (15 generated)
ncarter (slow)
4 years, 6 months ago (2016-06-02 21:18:35 UTC) #7
ncarter (slow)
Ahmed, please review!
4 years, 6 months ago (2016-06-02 21:18:50 UTC) #8
afakhry
Here are some preliminary comments. Overall, I like this CL. I also LOVE the tests ...
4 years, 6 months ago (2016-06-03 17:53:42 UTC) #11
afakhry
I took another look at your algorithm and I liked it. I also did some ...
4 years, 6 months ago (2016-06-06 18:11:59 UTC) #12
ncarter (slow)
I'll come back to this patch tomorrow, just responding to a couple comments. https://codereview.chromium.org/2028753002/diff/210001/chrome/browser/task_management/sampling/task_manager_impl.cc File ...
4 years, 6 months ago (2016-06-08 21:37:50 UTC) #13
afakhry
https://codereview.chromium.org/2028753002/diff/210001/chrome/browser/task_management/sampling/task_manager_impl.cc File chrome/browser/task_management/sampling/task_manager_impl.cc (right): https://codereview.chromium.org/2028753002/diff/210001/chrome/browser/task_management/sampling/task_manager_impl.cc#newcode260 chrome/browser/task_management/sampling/task_manager_impl.cc:260: a->task_id()) < On 2016/06/08 21:37:50, ncarter wrote: > FYI ...
4 years, 6 months ago (2016-06-09 13:33:53 UTC) #14
ncarter (slow)
https://codereview.chromium.org/2028753002/diff/210001/chrome/browser/task_management/sampling/task_manager_impl.cc File chrome/browser/task_management/sampling/task_manager_impl.cc (right): https://codereview.chromium.org/2028753002/diff/210001/chrome/browser/task_management/sampling/task_manager_impl.cc#newcode259 chrome/browser/task_management/sampling/task_manager_impl.cc:259: return std::make_tuple(!!a->GetParentTask(), a->GetType(), a->GetTabId(), On 2016/06/06 18:11:59, afakhry wrote: ...
4 years, 6 months ago (2016-06-20 17:40:00 UTC) #18
afakhry
lgtm. Thanks for this CL! https://codereview.chromium.org/2028753002/diff/210001/chrome/browser/task_management/sampling/task_manager_impl.cc File chrome/browser/task_management/sampling/task_manager_impl.cc (right): https://codereview.chromium.org/2028753002/diff/210001/chrome/browser/task_management/sampling/task_manager_impl.cc#newcode271 chrome/browser/task_management/sampling/task_manager_impl.cc:271: std::unordered_map<const Task*, std::vector<const Task*>> ...
4 years, 6 months ago (2016-06-22 13:49:46 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2028753002/270001
4 years, 6 months ago (2016-06-22 16:15:42 UTC) #21
commit-bot: I haz the power
Committed patchset #15 (id:270001)
4 years, 6 months ago (2016-06-22 17:26:19 UTC) #23
commit-bot: I haz the power
4 years, 6 months ago (2016-06-22 17:30:19 UTC) #25
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/0088a36baa443168daf851f3ccf95a2ad7090802
Cr-Commit-Position: refs/heads/master@{#401328}

Powered by Google App Engine
This is Rietveld 408576698