New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 599820 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
User never visited
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature



Sign in to add a comment

ThreadData instances is not properly reused by worker threads

Reported by zhenyu.s...@intel.com, Apr 1 2016

Issue description

Steps to reproduce the problem:
Multiple unnecessary instances of tracked_objects::ThreadData is created for worker threads

What is the expected behavior?
ThreadData should reuse its instances for worker threads as comment in ThreadData::OnThreadTerminationCleanup() said.

What went wrong?
ThreadData::InitializeThreadContext() treats every thread in same way and didn't set worker_thread_number_ properly for worker threads

Did this work before? N/A 

Chrome version: 48.0.2564.82  Channel: n/a
OS Version: 
Flash Version: Shockwave Flash 21.0 r0
 
Owner: klo...@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 2 by klo...@chromium.org, Apr 18 2016

Labels: -OS-Android OS-All
Owner: jar@chromium.org
Do not believe this is Android specific.
Actually I have a patch addressing this issue here:

https://codereview.chromium.org/1845753006/

Please take a look. Thanks!
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a55ed003ab5d1a34d0b7b00e2a662aae272d71d8

commit a55ed003ab5d1a34d0b7b00e2a662aae272d71d8
Author: zhenyu.shan <zhenyu.shan@intel.com>
Date: Tue Jun 07 21:05:34 2016

Don't create redundant ThreadData for Worker Threads

Before creating tracked_objects::ThreadData for a thread, see if it's a
WorkerThread. If is, try reusing ThreadData instance for previously
finished WorkerThread.

This stops unneccessary |ThreadData| instance to be created, reduces a
small portion of memory usage, especially on long running renderer
processes.

BUG=599820

Review-Url: https://codereview.chromium.org/1845753006
Cr-Commit-Position: refs/heads/master@{#398369}

[modify] https://crrev.com/a55ed003ab5d1a34d0b7b00e2a662aae272d71d8/base/threading/platform_thread.h
[modify] https://crrev.com/a55ed003ab5d1a34d0b7b00e2a662aae272d71d8/base/tracked_objects.cc
[modify] https://crrev.com/a55ed003ab5d1a34d0b7b00e2a662aae272d71d8/base/tracked_objects.h

Sign in to add a comment