0
Commit Graph

223 Commits

Author SHA1 Message Date
Eric Seckler
39c6f5a6d8 tracing: Enable startup tracing in zygote children after mojo is up
We're refactoring startup tracing in Chrome, see design doc[1]. With
the new startup tracing architecture, each process needs to allocate a
shared memory buffer when enabling startup tracing.

In zygote child processes, this is only possible after mojo's IPC
support is brought up, because the mojo broker has to create the buffer
on the process's behalf (the zygote sandbox prevents the child processes
from doing this themselves).

To prepare for the startup tracing refactor, this patch moves startup
tracing initialization for zygote child processes from
ContentMainRunner to their respective main functions, until after mojo
is brought up by the respective ChildThreadImpl subclass.

We should only lose minimal tracing data due to this change (from the
early part of the respective main function), and only from zygote
children (primarily renderer + utility processes) on Linux/ChromeOS.

[1] https://docs.google.com/document/d/1FygJQbD29vMkfVfT7m0Lb1u1zZZU1VgXAPi_R0uBoTw/edit?usp=sharing

Bug: 1006753
Change-Id: I59c21b2b383c755925dc5ff0c19160985e089800
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2038574
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#739869}
2020-02-10 15:06:13 +00:00
Oystein Eftevaag
3b0ce9fb00 Make sure the main-thread TracingSamplerProfiler is explicitly destroyed
Otherwise, if it's destroyed through TLS, it can hang forever waiting
for a signal from the StackSamplingThread which never occurs.

This is going back to the behavior prior to
https://chromium-review.googlesource.com/c/chromium/src/+/1638578

R=ssid@chromium.org

Bug: 995323
Change-Id: I08863f5ee8ccd01c70b95bbce5fc28922dc06d1f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1761291
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: ssid <ssid@chromium.org>
Commit-Queue: oysteine <oysteine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#688622}
2019-08-20 18:13:45 +00:00
Chris Sharp
7840c58097 Reland "Reland "Remove references to MessagePump::Type""
This reverts commit 8f5f3e89a5.

Reason for revert: Revert wasn't needed

Original change's description:
> Revert "Reland "Remove references to MessagePump::Type""
> 
> This reverts commit 1c1d61e5d9.
> 
> Reason for revert: I suspect this is causing a compile failure on the Linux ChromiumOS Full Bot.
> 
> Output:
> FAILED: obj/chromeos/services/assistant/tests/service_unittest.o
> /b/s/w/ir/cache/goma/client/gomacc ../../third_par...
> ../../chromeos/services/assistant/service_unittest.cc:12:10: fatal error: 'ash/public/interfaces/constants.mojom-forward.h' file not found
> #include "ash/public/interfaces/constants.mojom-forward.h"
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
> Original change's description:
> > Reland "Remove references to MessagePump::Type"
> > 
> > This is a reland of bfca9d675c
> > 
> > Was reverted because an optional trybot failed due to a missing include in an unrelated file.
> > That was fixed in https://crrev.com/c/1729634 and https://crrev.com/c/1730894
> > 
> > Original change's description:
> > > Remove references to MessagePump::Type
> > >
> > > It is going away soon, replace with the real thing: MessagePumpType
> > >
> > > Had to fix a lot of includes (MessagePumpType is defined in message_pump_type.h).
> > >
> > > This is a mechanical change that will be reviewed according to
> > > https://chromium.googlesource.com/chromium/src/+/master/docs/code_reviews.md#mechanical-changes
> > >
> > > Bug: 891670
> > > TBR=gab@chromium.org
> > >
> > > Change-Id: I1c85fce3cc11f7a283153ccaf2596e6e92a638d7
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1726058
> > > Commit-Queue: Carlos Caballero <carlscab@google.com>
> > > Reviewed-by: Gabriel Charette <gab@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#682731}
> > 
> > TBR=gab@chromium.org
> > 
> > Bug: 891670
> > Change-Id: I7654fb4ff3a5e8c0505aafb33939d2035f28f88b
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1730416
> > Commit-Queue: Carlos Caballero <carlscab@google.com>
> > Reviewed-by: Gabriel Charette <gab@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#683592}
> 
> TBR=gab@chromium.org,carlscab@google.com
> 
> Change-Id: Ie479741cf8092d9110a9ee6c5fa81e7e084c6788
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 891670
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1733432
> Reviewed-by: Chris Sharp <csharp@chromium.org>
> Commit-Queue: Chris Sharp <csharp@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#683602}

TBR=gab@chromium.org,csharp@chromium.org,carlscab@google.com

Change-Id: Ieb323e7afaf248384c05b8cb0c13d6ec50856c75
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 891670
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1733434
Reviewed-by: Chris Sharp <csharp@chromium.org>
Commit-Queue: Chris Sharp <csharp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683603}
2019-08-02 15:45:32 +00:00
Chris Sharp
8f5f3e89a5 Revert "Reland "Remove references to MessagePump::Type""
This reverts commit 1c1d61e5d9.

Reason for revert: I suspect this is causing a compile failure on the Linux ChromiumOS Full Bot.

Output:
FAILED: obj/chromeos/services/assistant/tests/service_unittest.o
/b/s/w/ir/cache/goma/client/gomacc ../../third_par...
../../chromeos/services/assistant/service_unittest.cc:12:10: fatal error: 'ash/public/interfaces/constants.mojom-forward.h' file not found
#include "ash/public/interfaces/constants.mojom-forward.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Original change's description:
> Reland "Remove references to MessagePump::Type"
> 
> This is a reland of bfca9d675c
> 
> Was reverted because an optional trybot failed due to a missing include in an unrelated file.
> That was fixed in https://crrev.com/c/1729634 and https://crrev.com/c/1730894
> 
> Original change's description:
> > Remove references to MessagePump::Type
> >
> > It is going away soon, replace with the real thing: MessagePumpType
> >
> > Had to fix a lot of includes (MessagePumpType is defined in message_pump_type.h).
> >
> > This is a mechanical change that will be reviewed according to
> > https://chromium.googlesource.com/chromium/src/+/master/docs/code_reviews.md#mechanical-changes
> >
> > Bug: 891670
> > TBR=gab@chromium.org
> >
> > Change-Id: I1c85fce3cc11f7a283153ccaf2596e6e92a638d7
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1726058
> > Commit-Queue: Carlos Caballero <carlscab@google.com>
> > Reviewed-by: Gabriel Charette <gab@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#682731}
> 
> TBR=gab@chromium.org
> 
> Bug: 891670
> Change-Id: I7654fb4ff3a5e8c0505aafb33939d2035f28f88b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1730416
> Commit-Queue: Carlos Caballero <carlscab@google.com>
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#683592}

TBR=gab@chromium.org,carlscab@google.com

Change-Id: Ie479741cf8092d9110a9ee6c5fa81e7e084c6788
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 891670
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1733432
Reviewed-by: Chris Sharp <csharp@chromium.org>
Commit-Queue: Chris Sharp <csharp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683602}
2019-08-02 15:37:08 +00:00
Carlos Caballero
1c1d61e5d9 Reland "Remove references to MessagePump::Type"
This is a reland of bfca9d675c

Was reverted because an optional trybot failed due to a missing include in an unrelated file.
That was fixed in https://crrev.com/c/1729634 and https://crrev.com/c/1730894

Original change's description:
> Remove references to MessagePump::Type
>
> It is going away soon, replace with the real thing: MessagePumpType
>
> Had to fix a lot of includes (MessagePumpType is defined in message_pump_type.h).
>
> This is a mechanical change that will be reviewed according to
> https://chromium.googlesource.com/chromium/src/+/master/docs/code_reviews.md#mechanical-changes
>
> Bug: 891670
> TBR=gab@chromium.org
>
> Change-Id: I1c85fce3cc11f7a283153ccaf2596e6e92a638d7
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1726058
> Commit-Queue: Carlos Caballero <carlscab@google.com>
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#682731}

TBR=gab@chromium.org

Bug: 891670
Change-Id: I7654fb4ff3a5e8c0505aafb33939d2035f28f88b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1730416
Commit-Queue: Carlos Caballero <carlscab@google.com>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683592}
2019-08-02 15:10:39 +00:00
Findit
b0504e9d67 Revert "Remove references to MessagePump::Type"
This reverts commit bfca9d675c.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 682731 as the
culprit for failures in the build cycles as shown on:
https://analysis.chromium.org/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtL2JmY2E5ZDY3NWM1MjQ4NDNiOGJiNmEwZDAxNGUyOWQ0ZDY4NTkwNTYM

Sample Failed Build: https://ci.chromium.org/buildbot/chromium/win-archive-rel/3468

Sample Failed Step: compile

Original change's description:
> Remove references to MessagePump::Type
> 
> It is going away soon, replace with the real thing: MessagePumpType
> 
> Had to fix a lot of includes (MessagePumpType is defined in message_pump_type.h).
> 
> This is a mechanical change that will be reviewed according to
> https://chromium.googlesource.com/chromium/src/+/master/docs/code_reviews.md#mechanical-changes
> 
> Bug: 891670
> TBR=gab@chromium.org
> 
> Change-Id: I1c85fce3cc11f7a283153ccaf2596e6e92a638d7
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1726058
> Commit-Queue: Carlos Caballero <carlscab@google.com>
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#682731}


Change-Id: Idf6e0f69a07267d3a322c700882d2b3f65dcf021
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 891670
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1729553
Cr-Commit-Position: refs/heads/master@{#682762}
2019-07-31 16:42:20 +00:00
Carlos Caballero
bfca9d675c Remove references to MessagePump::Type
It is going away soon, replace with the real thing: MessagePumpType

Had to fix a lot of includes (MessagePumpType is defined in message_pump_type.h).

This is a mechanical change that will be reviewed according to
https://chromium.googlesource.com/chromium/src/+/master/docs/code_reviews.md#mechanical-changes

Bug: 891670
TBR=gab@chromium.org

Change-Id: I1c85fce3cc11f7a283153ccaf2596e6e92a638d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1726058
Commit-Queue: Carlos Caballero <carlscab@google.com>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682731}
2019-07-31 15:49:24 +00:00
Oystein Eftevaag
71022d6001 Converted the tracing sampler profiler to output Perfetto protos instead of JSON
R=ssid@chromium.org,eseckler@chromium.org
TBR=dcheng@chromium.org

Bug: 967008
Change-Id: Ie6a70481a53c89d6a576a08a7ac7f3d3bedd06a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1638578
Commit-Queue: oysteine <oysteine@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: ssid <ssid@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676715}
2019-07-12 02:41:29 +00:00
Yuchen Liu
c8efc77870 [Fuchsia] Change renderer main thread message loop type to IO.
This is to allow FIDL APIs to be called from renderer main thread.

Bug: 966191
Test: Build web_runner
Change-Id: I2e0f4d5fae591d36293d321e7cdfdd4b0c303b0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1679229
Commit-Queue: Yuchen Liu <yucliu@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#673796}
2019-07-01 20:16:10 +00:00
Oystein Eftevaag
424fd3768c Tracing: Moved the tracing sampling profiler to the tracing service
First step towards migrating the profiler to Perfetto.

R=ssid@chromium.org

Bug: 967008
Change-Id: If714e13b2796728766b4f010593a223dd1f24c32
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1629177
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: oysteine <oysteine@chromium.org>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: ssid <ssid@chromium.org>
Commit-Queue: oysteine <oysteine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#667216}
2019-06-07 17:51:03 +00:00
Alex Clarke
636e705be4 Introduce SingleThreadTaskExecutor the replacement for base::MessageLoop
A large but mostly trivial patch in preparation for removing
base::MessageLoop. We introduce SingleThreadTaskExecutor a simple FIFO
scheduler, which is intended for non-test code that needs a simple
single threaded task environment. Tests should use ScopedTaskEnvironment
or TestBrowserThreadBundle instead.

This patch also moves MessageLoop::Type to MessagePump::Type and
moves the factory method to MessagePump::Create.

TBR=gab@chromium.org

Change-Id: I9850c4657bb90b62490f4313c420cae025101371
BUG: 891670
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1632216
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Alex Clarke <alexclarke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664709}
2019-05-30 10:49:37 +00:00
Alexei Filippov
6e586428fc [heap profiler] Remove support for --sampling-heap-profiler flag
It has been replaced with --memlog* set of flags.

BUG=923459

Change-Id: I539c514b3f25decd0dccb827d1757e133403e9d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1586535
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#654663}
2019-04-26 23:26:51 +00:00
Avi Drissman
07d2245c56 Enforce correct thread usage of the core render page objects.
BUG=none

Change-Id: I71a00f93f5382ff1849c05de92ab15b315a8f59f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1529181
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#643906}
2019-03-25 17:56:39 +00:00
Sami Kyostila
a515998113 sequence_manager: Enable SequenceManager by default in Blink
This patch removes the experiment to enable the SequenceManager on the
renderer main thread (i.e., in Blink). Since the old MessageLoop
implementation was recently removed, the "disabled" arm of this
experiment is now testing a nonsensical configuration
(SequenceManager-on-SequenceManage).

TBR=bcwhite@chromium.org

Bug: 891670
Change-Id: Ic3607bef3de356491a433a6bff50a74331adf821
Reviewed-on: https://chromium-review.googlesource.com/c/1451849
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Auto-Submit: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#629082}
2019-02-05 09:33:31 +00:00
Etienne Bergeron
683ce59446 Change TracingSamplerProfiler observer from async to sync
This CL is changing the kind of observer used by the sampling profiler
wrapper class. The proposed implementation is to use the sync version
which is fixing early startup tracing/sampling.

The previous code was using a Async observer to keep the class
thread-safe. Unfortunately, the sampling profiler is not able to start
early enough on startup. The hooks are at the right place.

The reason why it's not working on startup is because the tasks queue is
already loaded of startup tasks to be executed on the main thread.
Thus, after activating tracing, there is a long gab between the point
where the tigger occurs and when the sampling profiler got created and
start to collect samples (e.g. OnTraceLogEnabled).

To avoid this delay, we prefer using a Sync observer. That forces the class
to be thread-safe.

R=oysteine@chromium.org
CC=​ssid@chromium.org, wittman@chromium.org

Change-Id: I02a1deb2f8aa705ccbf5fb6e7026f4588ca1b319
Reviewed-on: https://chromium-review.googlesource.com/c/1359293
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: oysteine <oysteine@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614784}
2018-12-07 19:34:37 +00:00
Etienne Pierre-Doray
80d95b049b [SlowReport]: Add tracing sampling profiler to renderer process.
Instantiate TracingSamplerProfiler in RendererMain.

Change-Id: I527be13dcff3a58a4e60c8fe8ca21474515b91b0
Reviewed-on: https://chromium-review.googlesource.com/c/1336075
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: oysteine <oysteine@chromium.org>
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613178}
2018-12-03 19:00:11 +00:00
Carlos Caballero
7f2e723762 [Reland] Feature to run Blink main thread using SequenceManager
This will enable us to start trialing the MessageLoop replacement by
SequenceManager.

We only do this in the Blink main thread for now. There is some work
needed around SequenceManager ownership to be done before this can be
enabled in worker threads.

Original change https://chromium-review.googlesource.com/c/1349316

TBR=dcheng@chromium.org

Bug: 891670
Change-Id: I68a59ec2d780106bb5fd76cee5976e236f9316f6
Reviewed-on: https://chromium-review.googlesource.com/c/1358452
Commit-Queue: Carlos Caballero <carlscab@google.com>
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613132}
2018-12-03 17:13:45 +00:00
Wez
1ef457d1b9 Revert "Feature to run Blink main thread using SequenceManager"
This reverts commit 66fbaed952.

Reason for revert: Revert required to allow https://chromium-review.googlesource.com/c/chromium/src/+/1354919 to be reverted cleanly for issue 910645.

Original change's description:
> Feature to run Blink main thread using SequenceManager
>
> This will enable us to start trialing the MessageLoop replacement by
> SequenceManager.
>
> We only do this in the Blink main thread for now. There is some work
> needed around SequenceManager ownership to be done before this can be
> enabled in worker threads.
>
>
> Bug: 891670
> Change-Id: I1e59784ff35c87883a66d9b315435bf47cd0f809
> Reviewed-on: https://chromium-review.googlesource.com/c/1349316
> Reviewed-by: Alex Clarke <alexclarke@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Reviewed-by: Alexander Timin <altimin@chromium.org>
> Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
> Commit-Queue: Carlos Caballero <carlscab@google.com>
> Cr-Commit-Position: refs/heads/master@{#612185}

TBR=dcheng@chromium.org,skyostil@chromium.org,alexclarke@chromium.org,altimin@chromium.org,carlscab@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 910645, 891670
Change-Id: I3529309984cd61dfef8a10e49129d364efabcf1f
Reviewed-on: https://chromium-review.googlesource.com/c/1357016
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612737}
2018-11-30 19:59:38 +00:00
Matthew Denton
95164f376d Add Support for Random Mojo Message Delays
Adds periodic pausing/resuming of random mojo bindings, to test whether Mojo users are relying on FIFO ordering of messages sent over different message pipes.

Bug: 830815
Change-Id: Ie765813235a6ff720b2c4c3be550ad474b7be566
Reviewed-on: https://chromium-review.googlesource.com/c/1325551
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612321}
2018-11-29 19:41:52 +00:00
Carlos Caballero
66fbaed952 Feature to run Blink main thread using SequenceManager
This will enable us to start trialing the MessageLoop replacement by
SequenceManager.

We only do this in the Blink main thread for now. There is some work
needed around SequenceManager ownership to be done before this can be
enabled in worker threads.


Bug: 891670
Change-Id: I1e59784ff35c87883a66d9b315435bf47cd0f809
Reviewed-on: https://chromium-review.googlesource.com/c/1349316
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Carlos Caballero <carlscab@google.com>
Cr-Commit-Position: refs/heads/master@{#612185}
2018-11-29 14:40:58 +00:00
Vlad Tsyrklevich
acaeb6436a Delete outdated comment
This comment was added in http://crrev.com/335223003; however, it's no
longer applicable as of http://crrev.com/1928863002. The FeatureList
initialization occurs before RendererMain is reached.

Change-Id: I6a0609de03aa1c69319021adf0ccea9d76bac2cf
Reviewed-on: https://chromium-review.googlesource.com/c/1343253
Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609916}
2018-11-21 04:54:50 +00:00
Sebastien Marchand
75a7cdfb81 Move the base/sys_info* files to base/system/
This is a part of my effort to cleanup our system-wide metric
measurement code.

TBR=wfh@chromium.org,bartfab@chromium.org,jochen@chromium.org,rsesek@chromium.org,kinuko@chromium.org

Bug: 891864
Change-Id: I896b8936d91789ba0e0423f0937cd54c973bfcda
Reviewed-on: https://chromium-review.googlesource.com/c/1327441
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607813}
2018-11-13 23:47:03 +00:00
Alexander Timin
4f9c35c363 [message_loop] Remove message_loop_forward.h
As a final step, replace all includes back:
- mv message_loop_current.h message_loop.h
- s/message_loop_forward.h/message_loop.h/ in all includes.
- s/message_loop_forward.h/message_loop.h/ in base/BUILD.gn
- Remove message_loop_forward.h from third_party/DEPS.

TBR=gab@chromium.org
R=gab@chromium.org
BUG=891670

Change-Id: I623077025701459ddb7045cbcfdad138aa90a9e4
Reviewed-on: https://chromium-review.googlesource.com/c/1313110
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604690}
2018-11-01 20:15:20 +00:00
Alexander Timin
c643d0e146 [message_loop] Temporary introduce message_loop_forward.h.
To facilitate splitting MessageLoop into MessageLoop and MessageLoopImpl
introduce message_loop_forward.h and use it everywhere.

- s/message_loop.h/message_loop_forward.h/ in all includes.
- Add message_loop_forward.h to base/BUILD.gn.
- Add message_loop_forward.h to third_party/DEPS.

TBR=gab@chromium.org
BUG=891670

Change-Id: Ibac3a24f5bd4291c9d57dd32c627477e4e6ef324
Reviewed-on: https://chromium-review.googlesource.com/c/1313108
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604672}
2018-11-01 19:43:28 +00:00
Wez
6979109b59 Migrate non-test code in //content off of QuitCurrent*Deprecated().
- ChildThreadImpl now takes a |quit_closure|, which is provided by all
  sub-classes when used out-of-process.
- Sub-classes which can run in-process instead pass base::DoNothing() to
  ChildThreadImpl, to instead rely on the in-browser Thread having
  Stop() invoked on it, to shut them down.

Bug: 859095
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
Change-Id: I0251db64063601a6a9de8883c8558e25104e5b0b
Reviewed-on: https://chromium-review.googlesource.com/1200839
Reviewed-by: enne <enne@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589564}
2018-09-07 17:30:56 +00:00
Alexei Filippov
d6363e4704 [sampling heap profiler] Extract Poisson sampler into a separate class.
Make Poisson sampler a separate class that is responsible for listening
for allocation and doing the sampling with given sampling interval.

SamplingHeapProfiler is now an observer of PoissonAllocationObserver.
Once a sample added it record the native stack and stores the sample
in the map. The list of recorded samples can then be retrieved by clients.

TBR=ajwong@chromium.org
BUG=803276

Change-Id: I1e568b9839d9cc0099704ba1b9f047c14a46a0ee
Reviewed-on: https://chromium-review.googlesource.com/1189713
Reviewed-by: Alexei Filippov <alph@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586369}
2018-08-27 19:31:39 +00:00
Greg Kraynov
f5d6027c9b Remove MessageLoop from content::RenderThreadImpl.
It only needs main thread scheduler to initialize,
MessageLoop was unnecessary there.

Bug: 828835
Change-Id: I70235bbd06af1ca6c576cc77e3e4722a27225069
Reviewed-on: https://chromium-review.googlesource.com/1169211
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Greg Kraynov <kraynov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582125}
2018-08-10 12:28:51 +00:00
Dominik Röttsches
ac24004e38 Move Blink Sandbox IPC to Mojo Calls
This is a reland of
https://chromium-review.googlesource.com/c/chromium/src/+/1109964
Tbr'ing previous reviewers from that CL as the exact change has been
previously reviewed there.

The revert was done manually in response to flakiness of viz_browser
tests in MSAN. See issue https://crbug.com/860349 - my analysis is in
issue https://crbug.com/860445 where I disable this test. In short, I
believe my CL exposed a previously existing race condition in that test.

Instead of Chromium IPC macro-defined messages or Mojo, Chrome on Linux
uses hand-pickled IPC messages through a special purpose file descriptor
to send messages from the renderer to the browser host in order to
access FontConfig for font matching and font fallback. This system is
described in docs/linux_sandbox_ipc.md.

For the "Font Matching by Full Font Name / PS Name" effort, see issue
828317, additional out of process font methods are needed. Instead of
adding them to this legacy hand-written IPC, we modernize the Linux
Sandbox IPC mechanism and upgrade it to using Mojo interface definitions
and a service architecture, in which a font service running in an
unsandboxed utility process answers FontConfig requests from the
renderer.

Previous CLs [1], [2] prepared the Font Service to have testing and
additional font fallback and render-style-for-strike methods. Now we can
move Blink over to using this Mojo interface and remove the traditional
sandbox IPC handlers since we do not use the file descriptor based IPC
anymore for FontConfig acces.

For more details, please refer to the design doc in issue 839344.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1091754
[2] https://chromium-review.googlesource.com/c/chromium/src/+/1087951

Bug: 855021
Change-Id: I74663c5685a7797089e4d69354453146c245e20a
Tbr: skyostil@chromium.org, michaelpg@chromium.org, rsesek@chromium.org, halliwell@chromium.org, thestig@chromium.org, piman@chromium.org, eae@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/1127028
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572930}
2018-07-06 09:52:40 +00:00
Makoto Shimazu
b916fccec8 Revert "Move Blink Sandbox IPC to Mojo Calls"
This reverts commit b993e42cac.

Reason for revert: MSan bot failure and find-it suggested this might be the culprit. Please see crbug.com/860349 for detail.

Failing test: MaybeSetMetadata/SafeBrowsingServiceMetadataTest.MalwareImg/0

Original change's description:
> Move Blink Sandbox IPC to Mojo Calls
> 
> Instead of Chromium IPC macro-defined messages or Mojo, Chrome on Linux
> uses hand-pickled IPC messages through a special purpose file descriptor
> to send messages from the renderer to the browser host in order to
> access FontConfig for font matching and font fallback. This system is
> described in docs/linux_sandbox_ipc.md.
> 
> For the "Font Matching by Full Font Name / PS Name" effort, see issue
> 828317, additional out of process font methods are needed. Instead of
> adding them to this legacy hand-written IPC, we modernize the Linux
> Sandbox IPC mechanism and upgrade it to using Mojo interface definitions
> and a service architecture, in which a font service running in an
> unsandboxed utility process answers FontConfig requests from the
> renderer.
> 
> Previous CLs [1], [2] prepared the Font Service to have testing and
> additional font fallback and render-style-for-strike methods. Now we can
> move Blink over to using this Mojo interface and remove the traditional
> sandbox IPC handlers since we do not use the file descriptor based IPC
> anymore for FontConfig acces.
> 
> For more details, please refer to the design doc in issue 839344.
> 
> [1] https://chromium-review.googlesource.com/c/chromium/src/+/1091754
> [2] https://chromium-review.googlesource.com/c/chromium/src/+/1087951
> 
> Bug: 855021
> Change-Id: I0f30a726621026566f50402afed00c92940b702c
> Reviewed-on: https://chromium-review.googlesource.com/1109964
> Commit-Queue: Dominik Röttsches <drott@chromium.org>
> Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
> Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Reviewed-by: Luke Halliwell <halliwell@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Reviewed-by: Antoine Labour <piman@chromium.org>
> Reviewed-by: Emil A Eklund <eae@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#572540}

TBR=rkc@chromium.org,thestig@chromium.org,michaelpg@chromium.org,eae@chromium.org,skyostil@chromium.org,servolk@chromium.org,slan@chromium.org,drott@chromium.org,halliwell@chromium.org,rsesek@chromium.org,piman@chromium.org

Change-Id: I290a80ed3f36443d91ec7e082d42f01871ffdba9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 855021, 860349
Reviewed-on: https://chromium-review.googlesource.com/1126719
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572709}
2018-07-05 05:18:25 +00:00
Dominik Röttsches
b993e42cac Move Blink Sandbox IPC to Mojo Calls
Instead of Chromium IPC macro-defined messages or Mojo, Chrome on Linux
uses hand-pickled IPC messages through a special purpose file descriptor
to send messages from the renderer to the browser host in order to
access FontConfig for font matching and font fallback. This system is
described in docs/linux_sandbox_ipc.md.

For the "Font Matching by Full Font Name / PS Name" effort, see issue
828317, additional out of process font methods are needed. Instead of
adding them to this legacy hand-written IPC, we modernize the Linux
Sandbox IPC mechanism and upgrade it to using Mojo interface definitions
and a service architecture, in which a font service running in an
unsandboxed utility process answers FontConfig requests from the
renderer.

Previous CLs [1], [2] prepared the Font Service to have testing and
additional font fallback and render-style-for-strike methods. Now we can
move Blink over to using this Mojo interface and remove the traditional
sandbox IPC handlers since we do not use the file descriptor based IPC
anymore for FontConfig acces.

For more details, please refer to the design doc in issue 839344.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1091754
[2] https://chromium-review.googlesource.com/c/chromium/src/+/1087951

Bug: 855021
Change-Id: I0f30a726621026566f50402afed00c92940b702c
Reviewed-on: https://chromium-review.googlesource.com/1109964
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572540}
2018-07-04 12:12:47 +00:00
Sergey Ulanov
55195e9d7c Fix renderer_main.cc to work on not-POSIX platforms other than Windows.
RendererMain() was not initializing renderer on platforms that don't
declare OS_POSIX, except Windows. Also cleaned-up RendererProcessImpl
initialization to make this problem less likely in the future.

Bug: 847669
Change-Id: I9a0ed7b39959deb980838699a3ebbec28c469265
Reviewed-on: https://chromium-review.googlesource.com/1077603
Reviewed-by: Fabrice de Gans-Riberi <fdegans@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563729}
2018-06-01 18:31:16 +00:00
Khushal
a4e236f29d content: Initialize skia in the GPU process for OOP raster.
Pull out the common skia initialization setup to a skia_utils used for
skia initialization in both the renderer and GPU.

R=piman@chromium.org

Bug: 844207
Change-Id: I629a7a036def92ede84dbb05f61207ce82762abf
Reviewed-on: https://chromium-review.googlesource.com/1081610
Commit-Queue: Khushal <khushalsagar@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563506}
2018-06-01 03:00:46 +00:00
Yuta Kitamura
deb91bb2d0 Merge WebMainThreadScheduler into WebThreadScheduler.
The class hierarchy between WebThreadScheduler and WebMainThread-
Scheduler has been an issue because it creates a complex class hierarchy
in implementation classes.

This patch merge those classes into one and simplify the relationship.
The new virtual member functions added to WebThreadScheduler only works
for a scheduler created on the main thread. The caller is aware of
which scheduler it's calling, so this is OK.

TBR=kinuko@chromium.org,jrummell@chromium.org

Bug: 826203
Change-Id: I90f3aa9b4718575778f210298320fc1f3448646c
Reviewed-on: https://chromium-review.googlesource.com/1074916
Commit-Queue: Yuta Kitamura <yutak@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562347}
2018-05-29 05:53:20 +00:00
Patrik Höglund
b564859b89 Removed BUILDFLAG(ENABLE_WEBRTC).
The enable_webrtc gn variable has been removed, so ENABLE_WEBRTC is
always true now; we may as well remove it.

Bug: chromium:800653
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Ie739a5ddb740a87f434bb12f8a451cd1040596a5
Reviewed-on: https://chromium-review.googlesource.com/1059408
Commit-Queue: Patrik Höglund <phoglund@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559492}
2018-05-17 11:17:16 +00:00
Jay Civelli
668c097f9a Reland "Move zygote code to service_manager"
Relanding the move zygote to the service manager. It was causing an TSAN
failure that now cannot be reproduced.

Original description:

"This CL moves the zygote code from content/ to
services/service_manager/zygote. This involves moving some switches from
content_switches.h to services/service_manager/embedder/switches.h and
moving some codes from content/public/common/result_codes.h to the new
services/service_manager/embedder/result_codes.h."

Tbr: avi@chromium.org
Tbr: sky@chromium.org
Tbr: scottmg@chromium.org
Tbr: rockot@chromium.org
Tbr: slan@chromium.org
Tbr: eseckler@chromium.org
Tbr: rsesek@chromium.org
Bug: 831846
Change-Id: Ief3c55a1d76ab0b0ded922770d14402c0c3b37b9
Reviewed-on: https://chromium-review.googlesource.com/1048040
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Jay Civelli <jcivelli@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Stephen Lanham <slan@chromium.org>
Commit-Queue: Jay Civelli <jcivelli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559276}
2018-05-16 20:44:13 +00:00
Ben Wagner
952c4e3478 Update SkFCI::SetGlobal to smart pointers.
This updates SkFontConfigInterface::SetGlobal calls to use the smart
pointer version. This removes the awkward trailing ->unref and will
allow Skia to remove the old non-smart version of this method.

Change-Id: Icf67a1976820f5f0f07243ab1539e90e18db2ef4
Reviewed-on: https://chromium-review.googlesource.com/1058019
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Ben Wagner <bungeman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558712}
2018-05-15 15:33:00 +00:00
CJ DiMeglio
d6679a3fa2 Revert "Reland "Move zygote code to service_manager""
This reverts commit 1536dfa3f0.

Reason for revert: Causes data race in DownloadContentTest.ForceDownloadMessageRfc822Page test 
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Linux%20TSan%20Tests/21108

Original change's description:
> Reland "Move zygote code to service_manager"
> 
> Relanding the move zygote to the service manager. It was breaking the
> non NaCl build.
> 
> Original description:
> 
> "This CL moves the zygote code from content/ to
> services/service_manager/zygote. This involves moving some switches from
> content_switches.h to services/service_manager/embedder/switches.h and
> moving some codes from content/public/common/result_codes.h to the new
> services/service_manager/embedder/result_codes.h."
> 
> Tbr: avi@chromium.org
> Tbr: sky@chromium.org
> Tbr: scottmg@chromium.org
> Tbr: rockot@chromium.org
> Tbr: slan@chromium.org
> Tbr: eseckler@chromium.org
> Tbr: rsesek@chromium.org
> Bug: 831846
> Change-Id: I8a4ceb2fe6b402d512a2f45b7fab0735b891c578
> Reviewed-on: https://chromium-review.googlesource.com/1037633
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
> Reviewed-by: Eric Seckler <eseckler@chromium.org>
> Reviewed-by: Scott Graham <scottmg@chromium.org>
> Reviewed-by: Luke Halliwell <halliwell@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Ken Rockot <rockot@chromium.org>
> Reviewed-by: Jay Civelli <jcivelli@chromium.org>
> Commit-Queue: Jay Civelli <jcivelli@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#555851}

TBR=avi@chromium.org,sky@chromium.org,jcivelli@chromium.org,rockot@chromium.org,tsepez@chromium.org,slan@chromium.org,halliwell@chromium.org,scottmg@chromium.org,rsesek@chromium.org,eseckler@chromium.org

Change-Id: If3e2d0985960aaafec57f0a6db26e6f078dd7ad9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 831846
Reviewed-on: https://chromium-review.googlesource.com/1043185
Reviewed-by: CJ DiMeglio <lethalantidote@chromium.org>
Commit-Queue: CJ DiMeglio <lethalantidote@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555884}
2018-05-03 21:40:35 +00:00
Jay Civelli
1536dfa3f0 Reland "Move zygote code to service_manager"
Relanding the move zygote to the service manager. It was breaking the
non NaCl build.

Original description:

"This CL moves the zygote code from content/ to
services/service_manager/zygote. This involves moving some switches from
content_switches.h to services/service_manager/embedder/switches.h and
moving some codes from content/public/common/result_codes.h to the new
services/service_manager/embedder/result_codes.h."

Tbr: avi@chromium.org
Tbr: sky@chromium.org
Tbr: scottmg@chromium.org
Tbr: rockot@chromium.org
Tbr: slan@chromium.org
Tbr: eseckler@chromium.org
Tbr: rsesek@chromium.org
Bug: 831846
Change-Id: I8a4ceb2fe6b402d512a2f45b7fab0735b891c578
Reviewed-on: https://chromium-review.googlesource.com/1037633
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Jay Civelli <jcivelli@chromium.org>
Commit-Queue: Jay Civelli <jcivelli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555851}
2018-05-03 20:07:09 +00:00
Matt Giuca
35f7133120 Revert "Move zygote code to service_manager"
This reverts commit dbe3973e8f.

Reason for revert: Broke compile on LKGR and local builds.
See https://crbug.com/838498.

Original change's description:
> Move zygote code to service_manager
> 
> This CL moves the zygote code from content/ to
> services/service_manager/zygote. This involves moving some switches from
> content_switches.h to services/service_manager/embedder/switches.h and
> moving some codes from content/public/common/result_codes.h to the new
> services/service_manager/embedder/result_codes.h.
> 
> Bug: 831846
> Change-Id: I9776a30412ea43c2c7f511967d2b7d05f18aa841
> Reviewed-on: https://chromium-review.googlesource.com/1012194
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Scott Graham <scottmg@chromium.org>
> Reviewed-by: Ken Rockot <rockot@chromium.org>
> Reviewed-by: Stephen Lanham <slan@chromium.org>
> Reviewed-by: Eric Seckler <eseckler@chromium.org>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Commit-Queue: Jay Civelli <jcivelli@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#554902}

TBR=avi@chromium.org,sky@chromium.org,dschuff@chromium.org,jcivelli@chromium.org,rockot@chromium.org,slan@chromium.org,scottmg@chromium.org,rsesek@chromium.org,eseckler@chromium.org

Change-Id: I318b3d8d74520b1fa7eda3d6d612d54e9dc2f040
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 831846, 838498
Reviewed-on: https://chromium-review.googlesource.com/1036706
Commit-Queue: Matt Giuca <mgiuca@chromium.org>
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555001}
2018-05-01 05:28:23 +00:00
Jay Civelli
dbe3973e8f Move zygote code to service_manager
This CL moves the zygote code from content/ to
services/service_manager/zygote. This involves moving some switches from
content_switches.h to services/service_manager/embedder/switches.h and
moving some codes from content/public/common/result_codes.h to the new
services/service_manager/embedder/result_codes.h.

Bug: 831846
Change-Id: I9776a30412ea43c2c7f511967d2b7d05f18aa841
Reviewed-on: https://chromium-review.googlesource.com/1012194
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Stephen Lanham <slan@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Jay Civelli <jcivelli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554902}
2018-04-30 22:28:27 +00:00
Jay Civelli
3ae893eff5 Dedupe the sandbox related switches
Makes services/service_manager/sandbox/switches.h the only place for
sandbox related switches, removing the dupped ones in content and
changing all call sites.

Tbr: bradnelson@chromium.org
Bug: 831846
Change-Id: I08928c664e0e2340ac5168d6fd94a07bbeb81266
Reviewed-on: https://chromium-review.googlesource.com/1012986
Commit-Queue: Jay Civelli <jcivelli@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551448}
2018-04-17 20:07:05 +00:00
Blink Reformat
a30d423812 The Great Blink mv for source files, part 1.
Update file contents without moving files.

NOAUTOREVERT=true
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=darin@chromium.org

Bug: 768828
Change-Id: I8a2f4535a49a25f44b43df32f25691c0a2556d28
Reviewed-on: https://chromium-review.googlesource.com/1001152
Commit-Queue: Blink Reformat <blink-reformat@chromium.org>
Reviewed-by: Blink Reformat <blink-reformat@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549060}
2018-04-07 15:31:06 +00:00
Yuta Kitamura
3331f5c7a7 Rename RendererScheduler to WebMainThreadScheduler.
Scheduler classes are being renamed as part of scheduler
architecture refactoring.

RendererScheduler is used in very many places, so this patch affects
a lot of files. The diffs are basically simple renames of classes,
functions or variables.

TBR=kinuko@chromium.org,dalecurtis@chromium.org

Bug: 826203
Change-Id: I4fd701b5e8b35e9ec5ab44f136af2fbe00f07d83
Reviewed-on: https://chromium-review.googlesource.com/994854
Commit-Queue: Yuta Kitamura <yutak@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548385}
2018-04-05 11:12:25 +00:00
Yuta Kitamura
e0a4f7c29d Rename files for ChildScheduler and its children.
Blink scheduler code is transitioning to a new directory structure.
This patch moves files for ChildScheduler and its children, and
rewrites affected include paths.

This patch only renames files; the class names are not changed yet.
The file names reflect the new names of the classes, instead of the
current names, to avoid renaming include paths twice. The class names
will be updated in a follow-up patch.

The renaming scheme of those classes is a bit complex. Look at the
design doc linked from the bug for details.

TBR=kinuko@chromium.org,dalecurtis@chromium.org

Bug: 826203
Change-Id: I72c10ee15f3510c11e9d0520d7f6e7d4a5715b66
Reviewed-on: https://chromium-review.googlesource.com/986112
Commit-Queue: Yuta Kitamura <yutak@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547422}
2018-04-02 07:56:19 +00:00
Scott Violet
02e38b93c3 Rename buildflag_headers for consistency
This updates ppapi.

Targets go from foo_features to foo_buildflags
And similarly the header now has buildflags in the name.

BUG=814485
TEST=covered by build
TBR=xhwang@chromium.org

Change-Id: I25f990ebd1e7f8530ddd0cee24dba31c88a45fae
Reviewed-on: https://chromium-review.googlesource.com/980921
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546312}
2018-03-27 23:42:14 +00:00
Scott Violet
a35f9a482b Rename buildflag_headers for consistency
This updates media and a couple of other minor ones.

Targets go from foo_features to foo_buildflags
And similarly the header now has buildflags in the name.

BUG=814485
TEST=covered by build
TBR=xhwang@chromium.org (for third_party)

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I2349230b278e3f6e163196fcf03b9b5fa1367e5d
Reviewed-on: https://chromium-review.googlesource.com/975990
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545268}
2018-03-22 22:00:44 +00:00
Gyuyoung Kim
eb496ebfd2 Pass the skia resource cache limit in the command line to renderer processes.
As skia font cache, we need to limit the memory usage of skia resource cache
for the low-end device as well. But, as the font cache, it's hard to estimate
what is the limit value the best for each low-end device. So it would be good
if we give them the power to limit to use the resource cache. This CL introduces
a new command line switch to limit the skia resource cache size.

Bug: 823210
Change-Id: Icc55a8701fe2fa94bdc0ee09b428c19031c131a5
Reviewed-on: https://chromium-review.googlesource.com/968006
Commit-Queue: Gyuyoung Kim <gyuyoung.kim@lge.com>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544007}
2018-03-19 11:26:02 +00:00
Gyuyoung Kim
2c54c01a7d Pass the skia font cache limit in the command line to renderer processes
Although issue 22852008 limited to use skia font cache for Android, we also need
to limit to use the skia font cache for other low-end devices like Android. However,
it's hard to estimate the overall memory usage of the skia font cache per each low-end
device. So it would be good if we give them the power to limit to use the font
cache. This CL introduces a new command line switch to limit the skia font cache
size.

Bug: 274452
Change-Id: Ia6bca318aab9514d5b66290826afda897747256d
Reviewed-on: https://chromium-review.googlesource.com/961745
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung.kim@lge.com>
Cr-Commit-Position: refs/heads/master@{#543246}
2018-03-15 00:02:32 +00:00
Alexei Filippov
b956afc836 Sampling Heap Profiler: Use TLS for accumulated bytes.
The TLS version has the same performance compared to lock-free version,
and also has the following benefits:
  - simpler code
  - handles multithreaded allocations with higher accuracy

It although has a potential corner case issue when there are lots
or short living threads each allocating small amount of memory.

BUG=803276,812262

Change-Id: Ie868f07b99559d8cc95d134eed6592bffe1f63aa
Reviewed-on: https://chromium-review.googlesource.com/944052
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542635}
2018-03-12 22:41:08 +00:00
Michael Spang
4d2bcd1e0e Remove the global ClientNativePixmapFactory
Make each buffer management object responsible for holding a
ClientNativePixmapFactory, removing the need for a global one. This
simplifies a number of initialization and ownership scenarios.

This makes it impossible for MUS to race to initialize the object, since
each object that needs it will have its own (sharing the factory globally
is not actually necessary).

To make this work, this moves GpuMemoryBufferImpl factory to a new object
GpuMemoryBufferSupport, since the majority of objects which should own a
ClientNativePixmapFactory used it via GpuMemoryBufferImpl::Create().

Bug: 807781
Test: browser_tests

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Icde20b247905555e80767b8c3eb77af6be9bbce1
Reviewed-on: https://chromium-review.googlesource.com/899949
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541696}
2018-03-08 02:26:47 +00:00