| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
This was a left-over from the previous swap-bootstrap-port-based approach.
BUG=13156
TEST=Open task manager. Should still work.
Review URL: http://codereview.chromium.org/551004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36088 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also move mach_ipc_mac to base, where it's now used.
Based on http://www.foldr.org/~michaelw/log/2009/03/13/ , but uses a named connection instead. Do the IPC right after fork-time, so that the sandbox is not yet in effect.
See the codereview comments for a benchmark that proves that this shouldn't be expensive, and for pros and cons for using a named connection vs temporarily switching out the bootstrap port.
Works for worker processes too and seems more reliable in general.
Measured perf impact in http://src.chromium.org/viewvc/chrome?view=rev&revision=35888 , it's negligible.
BUG=13156
TEST=(requires that one enables the task manager in browser.cc)
1.) Open one tab that plays a youtube video
2.) Open a second and visit http://www.whatwg.org/demos/workers/primes/page.html
3.) Install e.g. the gmail checker extension
4.) Open the task manager
It should report metrics for
* one browser process
* two renderer processes
* one plugin process
* one worker process
* one extension process
Check that %cpu etc more or less match what Activity Monitor displays if you filter for "Chromium".
Also choose "Open all bookmarks" on the bookmarks bar with the task manager open and check that metrics for all tabs appear immediately.
Review URL: http://codereview.chromium.org/549002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35977 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Based on http://www.foldr.org/~michaelw/log/2009/03/13/ , right now in proofofconcept quality.
Works for worker processes too and seems more reliable in general. Makes it impossible to call LaunchApp() concurrently though.
Next try: Submitting to get perf numbers, will revert.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=35883
Review URL: http://codereview.chromium.org/549002
TBR=thakis@chromium.org
Review URL: http://codereview.chromium.org/536009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35890 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Based on http://www.foldr.org/~michaelw/log/2009/03/13/ , right now in proof-of-concept quality.
Works for worker processes too and seems more reliable in general. Makes it impossible to call LaunchApp() concurrently though.
Next try: Submitting to get perf numbers, will revert.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=35883
Review URL: http://codereview.chromium.org/549002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35888 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Based on http://www.foldr.org/~michaelw/log/2009/03/13/ , right now in proofofconcept quality.
Works for worker processes too and seems more reliable in general. Makes it impossible to call LaunchApp() concurrently though.
Submitting to get perf numbers, will revert.
Review URL: http://codereview.chromium.org/549002
TBR=thakis@chromium.org
Review URL: http://codereview.chromium.org/544004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35884 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Based on http://www.foldr.org/~michaelw/log/2009/03/13/ , right now in proof-of-concept quality.
Works for worker processes too and seems more reliable in general. Makes it impossible to call LaunchApp() concurrently though.
Submitting to get perf numbers, will revert.
Review URL: http://codereview.chromium.org/549002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35883 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes two bugs:
- the output buffer for the ps command being run could be too small (fix: buffer
enlargened); and
- if the output buffer was too small, waitpid() wouldn't be called (fix: always
call waitpid(), obviously).
BUG=31378
TEST=On a big, long-running Chrome/Chromium (with many processes, e.g., renderers), check that there are no zombie ps processes (with PPID the browser process); looking at about:memory may help speed up the creation of such zombies. Also, run the new test, ProcessUtilTest.GetAppOutputRestrictedNoZombies.
Review URL: http://codereview.chromium.org/523033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35456 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
measurements on OS X.
Right now, this only works for the current process; support for child processes will be added in a later CL.
BUG=13156,25454
TEST=Hook up task manager (connect menu item to commandDispatch:, give it the right tag). Stats for the browser process should now be right, and %cpu should be 0 (for now) for all other processes.
Review URL: http://codereview.chromium.org/500118
TBR=thakis@chromium.org
Review URL: http://codereview.chromium.org/504068
TBR=thakis@chromium.org
Review URL: http://codereview.chromium.org/505056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35043 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
on OS X.
Right now, this only works for the current process; support for child processes will be added in a later CL.
BUG=13156,25454
TEST=Hook up task manager (connect menu item to commandDispatch:, give it the right tag). Stats for the browser process should now be right, and %cpu should be 0 (for now) for all other processes.
Review URL: http://codereview.chromium.org/500118
TBR=thakis@chromium.org
Review URL: http://codereview.chromium.org/504068
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35025 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Right now, this only works for the current process; support for child processes will be added in a later CL.
BUG=13156,25454
TEST=Hook up task manager (connect menu item to commandDispatch:, give it the right tag). Stats for the browser process should now be right, and %cpu should be 0 (for now) for all other processes.
Review URL: http://codereview.chromium.org/500118
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34994 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
ChildProcessLauncher.
BUG=28602
TEST=verified flash works on Mac
Review URL: http://codereview.chromium.org/439005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32854 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
Rather than printing errno, this macro prints useful error messages.
Review URL: http://codereview.chromium.org/420006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32642 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
renderer only, I'll take care of plugin/worker/utility processes in a followup change. (relanding 32203)
BUG=6844
Review URL: http://codereview.chromium.org/397031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32264 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements about:memory on Mac. It calls /bin/ps to obtain information
about processes (this is Apple's officially supported "API"). Unfortunately, ps
provides fairly minimal information (rss and vsize); top is better, but not a
stable API -- it has changed greatly between Mac OS 10.5 and 10.6, and moreover
the 10.6 version is more limited in its output formatting.
BUG=9653
TEST=Go to about:memory under a variety of conditions (with a variety of browsers loaded).
Review URL: http://codereview.chromium.org/333008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31168 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
test_shell_tests.
TEST=none
BUG=13770
Review URL: http://codereview.chromium.org/339024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30220 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
We probably want to discourage the use of ints for PIDs. This is a start; there are many other places where we should fix this.
BUG=25272
TEST=none
Review URL: http://codereview.chromium.org/300010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29511 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
inherently unsafe in multi-threaded apps because it stores the string in a global buffer. It should never be used. If you want to log an error, use PLOG and friends, or if that's too high-level then use safe_strerror().
TEST=built on Linux in 32-bit and 64-bit mode; ran base_unittests in each case; ran Chromium itself in each case; try servers
BUG=none
Review URL: http://codereview.chromium.org/261055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28850 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Discussed in part here:
http://groups.google.com/group/chromium-dev/browse_thread/thread/8e91f66f9af6ccec
This implements option 3, which turned out to be pretty simple.
BUG=19864
Review URL: http://codereview.chromium.org/215020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26647 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/195073
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26064 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
Random cleanup done in part of an unrelated change.
Review URL: http://codereview.chromium.org/195045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25790 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The browser process launches children with fork && exec. On the Mac, this
results in a child that has its exception ports set the same as the parent.
When Breakpad is enabled, this means that a child such as a renderer process
begins its life with its exception port pointing to a Breakpad instance
running inside the browser. This is not intended. Even if the child installs
its own Breakpad handler (which a renderer would), the previous handler would
be pointing to the instance inside the browser, and if the child's Breakpad
is misconfigured to pass exceptions to the previous handler it will wind up
being passed back to the parent. The misconfiguration was corrected in r25311.
This change restores the default exception handler port, which should be
Apple Crash Reporter/ReportCrash, in the child process immediately after it
it has been forked.
BUG=20371
TEST=None, because r25311 fixed the visible aspect of this bug
Review URL: http://codereview.chromium.org/200007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25371 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
http://codereview.chromium.org/172032.
The patch is contributed by Ben Laurie of Google.
Original review URL: http://codereview.chromium.org/180037
R=wtc
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/183016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24950 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Everything still worked correctly, but our performance bots didn't measure
any improvements. Perhaps I just ended up measuring the dtrace overhead of
fork vs vfork.
BUG=19863
Review URL: http://codereview.chromium.org/174229
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23969 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This means we can avoid creating new page tables, but that we share our memory
mappings / stack with the parent. This is a bit more fragile, but should be
workable. This saves us some work since we are just going to exec().
This also removes some sandbox unsetting code, since we shouldn't be spawning
processing under the sandbox anyway.
BUG=19863
Review URL: http://codereview.chromium.org/173141
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23911 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
version.
Fixes a race condition with file descriptors, and gives the Mac access to the environment-alterning version of LaunchApp
BUG=11174
TEST=Launching render/plugin/utility processes should still work on the Mac
Review URL: http://codereview.chromium.org/165067
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22649 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
conditions.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/159275
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21418 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
failure conditions.
BUG=17329
TEST=none
Review URL: http://codereview.chromium.org/159201
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21294 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=UI tests on Mac should no longer all log that kills are failing.
Review URL: http://codereview.chromium.org/155297
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20566 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
so fork() doesn't corrupt log files; lets --generate_suppressions
work even with the hacky valgrind fix that makes anything but --log-file
crash on child of fork().
Also avoid killing user desktop session if zygote dies!
BUG=none, but related to fix for http://crbug.com/15771
TEST=patch valgrind with fork workaround; sh tools/valgrind/chrome_tests.sh --generate_suppressions -t ui logs you out on linux without this.
Review URL: http://codereview.chromium.org/155130
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20024 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
This applies only to things which use TimeDelta::InMilliseconds, because
it returns int64. Before this patch callers static_casted that to int,
and after this patch they use the returned value as int64.
Review URL: http://codereview.chromium.org/126279
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18626 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, GetAppOutput was designed only for fuser. However, it
appears that Mac is using it to read the output of ps: which outputs
rather more. In this case, ps can fill up the pipe buffer while we are
waiting for it to exit, leading to deadlock depending on how many other
process are running on the system at the time.
http://codereview.chromium.org/118514
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18068 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=none (found with strace while running e.g. ProcessUtilTest.FDRemapping)
Review URL: http://codereview.chromium.org/115720
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17847 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
when running under Valgrind.
TEST=None
http://crbug.com/11412
Review URL: http://codereview.chromium.org/108042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15414 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On POSIX systems, system calls can be interrupted by signals. In this
case, they'll return EINTR, indicating that the system call needs to
be restarted.
(The situation is a little more complicated than this with SA_RESTART,
but you can read man 7 signal if you like.)
The short of it is that you need to catch EINTR and restart the call
for these system calls:
* read, readv, write, writev, ioctl
* open() when dealing with a fifo
* wait*
* Anything socket based (send*, recv*, connect, accept etc)
* flock and lock control with fcntl
* mq_ functions which can block
* futex
* sem_wait (and timed wait)
* pause, sigsuspend, sigtimedwait, sigwaitinfo
* poll, epoll_wait, select and 'p' versions of the same
* msgrcv, msgsnd, semop, semtimedop
* close (although, on Linux, EINTR won't happen here)
* any sleep functions (careful, you need to handle this are restart
with different arguments)
We've been a little sloppy with this until now. This patch adds a
macro for dealing with this and corrects every case of these system
calls (that I found).
The macro is HANDLE_EINTR in base/eintr_wrapper.h. It's safe to
include on Windows and is a no-op there.
On POSIX, it uses GCC magic to return the correct type based on the
expression and restarts the system call if it throws EINTR.
And you can use it like:
HANDLE_EINTR(close(fd));
Or:
ssize_t bytes_read = HANDLE_EINTR(read(fd, buffer, len));
*BEWARE* that it will evaluate the argument multiple times, so this is
not safe:
HANDLE_EINTR(close(FireMissiles()));
http://groups.google.com/group/chromium-dev/browse_thread/thread/41a35b2a457d73a0
http://codereview.chromium.org/100225
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15102 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When forking a child process, one often wants to move existing file
descriptors to well known locations (stdout, stderr etc). However,
this is a process bedeviled with corner cases. Consider the case where
you open two file descriptors, get assigned fds 1 and 0 for them and
wish to shuffle them so that they end up in slots 0 and 1. Our current
code fails in this case.
We also have a problem where we're currently trying to mark file
descriptors as close-on-exec rather than closing them in the child
process. This is inherently broken in a multithreaded process where
another thread can open a file descriptor and race the loop which is
trying to mark them.
Thus, on Linux we switch to close-after-fork where we known that no
other threads exist in the process. On Mac, the code is sufficiently
different that this simple fix isn't applicable and one of the Mac
folks will need to take a look.
http://codereview.chromium.org/100127
BUG=11174
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14978 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
TEST=Make sure that the task manager isn't obviously broken on Windows.
Review URL: http://codereview.chromium.org/93067
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14934 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
http://codereview.chromium.org/93147
BUG=9401
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14705 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
change re-enables the ui tests. Since jam re-enabled some tests,
I had to #ifdef around 4 tests that are not shutting down cleanly
on linux. It looks like we have renderers that aren't shutting
down properly (pegged at 100% cpu).
Review URL: http://codereview.chromium.org/100061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14680 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
process is pegged at 100% cpu after ui_tests has exited. Seeing
if this is the cause. Will re-roll forward if it's not.
TBR=estade
Review URL: http://codereview.chromium.org/100047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14620 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
Make WaitForSingleProcess respect base::kNoTimeout (which is equivalent to INFINITE on windows).
Review URL: http://codereview.chromium.org/99008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14508 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
Something else is trying to reap children in the ui_tests and causing
a mess. Reverting since it's a Friday night.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14499 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
TEST=Navigate to several different sites and check that no Chrome zombies are roaming around.
BUG=9401
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14488 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/92005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14440 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- use GetAppOutput instead of popen
- make unexpected conditions fatal (otherwise the tests using this code
would mistakenly assume that there is no running browser process)
Also add a constant for SingletonSocket.
Make necessary adjustments to GetAppOutput - ignore stderr (because fuser
prints the file name to stderr and having stderr in |output| would
require more parsing).
Review URL: http://codereview.chromium.org/77031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14091 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
It will replace popen call in chrome_process_util_linux.
I don't see much benefit in having a Windows implementation
(not many useful programs you can launch and get output),
so POSIX-only.
Review URL: http://codereview.chromium.org/67226
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13920 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
One more step to land http://codereview.chromium.org/54003 (chrome_process_util).
Review URL: http://codereview.chromium.org/62004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13086 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
This is a preparation to land http://codereview.chromium.org/54003,
which replaces chrome_process_filter with more portable chrome_process_util.
Review URL: http://codereview.chromium.org/57062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12948 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
to ~400.
Review URL: http://codereview.chromium.org/46039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11651 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/39185
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11103 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/27240
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10978 0039d316-1c4b-4281-b951-d872f2087c98
|