summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Use Xvfb in isolated testing only if use_x11 is set"Paweł Hajdan, Jr2015-01-081-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8a7be0714892c0c6360c45d0d602c119873b468e. We've been seeing a problem with tab_capture_end2end_tests taking too much time on linux_gpu_triggered_tests (over 1 hour as opposed to below 30 seconds). This was traced to wrong command on the isolate server, as can be seen e.g. with [1] (good) and [2] (bad). From builder history I was able to narrow down suspect revision range to just cafcab99f5ea (good) [3] and 8a7be0714892 (bad) [4]. There are only two CLs in that range, https://codereview.chromium.org/841693004 and https://codereview.chromium.org/813363003 . First one is just a histogram description change, while the latter changes *.isolate files, which is much more suspect. [1] https://isolateserver.appspot.com/browse?namespace=default-gzip&hash=13030c2ece3e5467ba858a978c685865181d32a6 [2] https://isolateserver.appspot.com/browse?namespace=default-gzip&hash=104dec9bff0fc701eac105a80d7d64be5b43b033 [3] http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu_triggered_tests/builds/97223 [4] http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu_triggered_tests/builds/97224 TBR=spang BUG=440882 Review URL: https://codereview.chromium.org/843713002 Cr-Commit-Position: refs/heads/master@{#310464}
* Use Xvfb in isolated testing only if use_x11 is setspang2015-01-081-19/+13
| | | | | | | | | | | | | | | We don't need a virtual X server for ozone testing, and it is causing problems running the tests with swarming. This changes all isolate files to only run Xvfb if use_x11==1 is set in GYP_DEFINES, and merges ozone with Windows & Mac (none of which need to run their own display server). BUG=440882 TEST=isolate.py run -s out_ozone/Debug/<various> TBR=maruel@chromium.org Review URL: https://codereview.chromium.org/813363003 Cr-Commit-Position: refs/heads/master@{#310434}
* Fixed GPU tracing so the categories do not get mixed.dyen2015-01-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | | Because of how the chromium tracing macros work, it is not possible to use the same line for multiple tracing categories. I have moved the GPU categories to a separate trace arg "gl_categories" instead, and changed the trace categories back to gpu.device and gpu.service. GroupPushMarkerEXT calls can no longer be disabled by their category. We currently use these to trace top level GPU traces which are constructed before the tracing categories are initialized. There were also some other issues related to having multiple channels in the GPU Tracer. Now functions that query the current trace take in a channel argument as well to differentiate the channels. R=vmiura@chromium.org BUG=None TEST=trybots Review URL: https://codereview.chromium.org/813573003 Cr-Commit-Position: refs/heads/master@{#310426}
* Remove virtuals from base::ElapsedTimerhashimoto2015-01-071-3/+2
| | | | | | | | | | | | http://crrev.com/338103003 was submitted without any base owner's approval. No other users of this class need Elapsed() to be virtual. BUG=None TEST=unit_tests --gtest_filter="ManagePasswords*" Review URL: https://codereview.chromium.org/828683003 Cr-Commit-Position: refs/heads/master@{#310388}
* Revert of Move ForkWithFlags from sandbox/ to base/ and plug it into ↵mek2015-01-076-172/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LaunchProcess. (patchset #2 id:20001 of https://codereview.chromium.org/831373002/) Reason for revert: PrcessTest.CloneWithFlags fails on Linux ChromiumOS Ozone Tests (1): http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Ozone%20Tests%20%281%29/builds/8139/steps/base_unittests/logs/CloneFlags ProcessTest.CloneFlags (run #1): [ RUN ] ProcessTest.CloneFlags ../../base/process/process_unittest.cc:241: Failure Value of: process.IsValid() Actual: false Expected: true [ FAILED ] ProcessTest.CloneFlags (0 ms) Original issue's description: > Move ForkWithFlags from sandbox/ to base/ and plug it into LaunchProcess. > > ForkWithFlags is a wrapper around the clone syscall that uses the libc > clone wrapper, and thus updates the libc's pid cache if it has one > (using sys_clone directly does not update the pid cache, so getpid may > return an incorrect result in the child). This exposes the ability to > set clone flags, which is needed to use Linux namespaces. > > BUG=312380 > > Committed: https://crrev.com/e12d6652ece2a3ab72bb05837cfd7f0b0b9ecf3a > Cr-Commit-Position: refs/heads/master@{#310327} TBR=jln@chromium.org,mdempsky@chromium.org,thestig@chromium.org,mark@chromium.org,rickyz@chromium.org NOTREECHECKS=true NOTRY=true BUG=312380 Review URL: https://codereview.chromium.org/842703002 Cr-Commit-Position: refs/heads/master@{#310355}
* Move ForkWithFlags from sandbox/ to base/ and plug it into LaunchProcess.rickyz2015-01-076-5/+172
| | | | | | | | | | | | | | ForkWithFlags is a wrapper around the clone syscall that uses the libc clone wrapper, and thus updates the libc's pid cache if it has one (using sys_clone directly does not update the pid cache, so getpid may return an incorrect result in the child). This exposes the ability to set clone flags, which is needed to use Linux namespaces. BUG=312380 Review URL: https://codereview.chromium.org/831373002 Cr-Commit-Position: refs/heads/master@{#310327}
* Revert of Fix EnableTerminationOnOutOfMemory for malloc (patchset #1 id:1 of ↵mek2015-01-071-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/836733006/) Reason for revert: Fails to compile on win8 gn dbg builder (http://build.chromium.org/p/chromium.win/builders/Win8%20GN%20%28dbg%29/builds/2649/steps/compile/logs/stdio): c:\b\build\slave\win8_gn__dbg_\build\src\base\process\memory_win.cc(22) :error C2220: warning treated as error - no 'object' file generated c:\b\build\slave\win8_gn__dbg_\build\src\base\process\memory_win.cc(22) : warning C4702: unreachable code Original issue's description: > Fix EnableTerminationOnOutOfMemory for malloc > > Currently only crashes on new and new[]. With the change it will also > crash when there is no memory for malloc as well. > > BUG=434397 > TEST=none. > > Committed: https://crrev.com/22d64abdc792516fd0f4895b26ae3a73c85239e0 > Cr-Commit-Position: refs/heads/master@{#310320} TBR=grt@chromium.org,cpu@chromium.org NOTREECHECKS=true NOTRY=true BUG=434397 Review URL: https://codereview.chromium.org/833923003 Cr-Commit-Position: refs/heads/master@{#310323}
* Fix EnableTerminationOnOutOfMemory for malloccpu2015-01-071-6/+7
| | | | | | | | | | | | Currently only crashes on new and new[]. With the change it will also crash when there is no memory for malloc as well. BUG=434397 TEST=none. Review URL: https://codereview.chromium.org/836733006 Cr-Commit-Position: refs/heads/master@{#310320}
* Nobody uses base::JsonPrefStore::ReadResult without a pathbratell2015-01-071-13/+2
| | | | | | | | | | | | | | | | | | | and if they had tried it, it would have crashed. This removes the code that tried to support non-path JsonPrefStore and adds a DCHECK in the constructor in case it happens in the future. If the code is ever needed in the future, the scoped_ptr<ReadResult> need to be initialized with new ReadResult. BUG= R=bauerb@chromium.org Review URL: https://codereview.chromium.org/836093005 Cr-Commit-Position: refs/heads/master@{#310300}
* Export __system_property_get symbol for component builds.fdegans2015-01-071-1/+1
| | | | | | | | | | | | This fixes the aarch64 component build. libnet relies on this symbol from libbase and it was failing to link properly due to it not being exported. BUG=392196 Review URL: https://codereview.chromium.org/840773002 Cr-Commit-Position: refs/heads/master@{#310293}
* [Android] Add a device-side test HTTP server via ↵jbudorick2015-01-071-0/+96
| | | | | | | | | | ChromeInstrumentationTestRunner. BUG=444049 Review URL: https://codereview.chromium.org/814143005 Cr-Commit-Position: refs/heads/master@{#310286}
* Revert of base: Enable browser-wide discardable memory on Linux, CrOS and ↵falken2015-01-074-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows. (patchset #1 id:1 of https://codereview.chromium.org/793443003/) Reason for revert: Likely causing many crashes in layout tests on chromium.webkit's WebKit Win7 (dbg) builder as well as tryserver's win_blink_rel. The failures started here: http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Win7%20%28dbg%29/builds/9070 Excerpt from log: 15:14:22.485 352 worker/3 virtual/deferred/inspector/tracing/timeline-style-recalc-with-invalidations.html crashed, (stderr lines): 15:14:22.485 352 [4300:4244:0106/151422:991308:FATAL:host_discardable_shared_memory_manager.cc(126)] Check failed: bytes_allocated_ >= size (0 vs. 4194304) 15:14:22.485 352 Backtrace: 15:14:22.485 352 base::debug::StackTrace::StackTrace [0x008CA731+33] 15:14:22.485 352 logging::LogMessage::~LogMessage [0x0095B6FF+63] 15:14:22.485 352 content::HostDiscardableSharedMemoryManager::ProcessRemoved [0x117B47DB+283] 15:14:22.485 352 content::RenderMessageFilter::~RenderMessageFilter [0x10DD88B4+628] 15:14:22.485 352 content::RenderMessageFilter::`vector deleting destructor' [0x10DD9DC7+87] 15:14:22.485 352 content::BrowserThread::DeleteOnThread<6>::Destruct<content::RenderMessageFilter> [0x10DC7A95+85] 15:14:22.485 352 content::RenderMessageFilter::OnDestruct [0x10DDD437+23] 15:14:22.485 352 content::BrowserMessageFilterTraits::Destruct [0x102F99B3+19] 15:14:22.485 352 base::RefCountedThreadSafe<content::BrowserMessageFilter,content::BrowserMessageFilterTraits>::Release [0x102FA602+82] 15:14:22.485 352 scoped_refptr<content::BrowserMessageFilter>::Release [0x102FA63E+14] 15:14:22.485 352 scoped_refptr<content::BrowserMessageFilter>::~scoped_refptr<content::BrowserMessageFilter> [0x102F8D91+33] 15:14:22.485 352 content::BrowserMessageFilter::Internal::~Internal [0x102F8FA3+35] 15:14:22.485 352 content::BrowserMessageFilter::Internal::`scalar deleting destructor' [0x102F9536+22] 15:14:22.485 352 base::RefCountedThreadSafe<IPC::MessageFilter,base::DefaultRefCountedThreadSafeTraits<IPC::MessageFilter> >::DeleteInternal [0x05C16FDF+63] 15:14:22.485 352 base::DefaultRefCountedThreadSafeTraits<IPC::MessageFilter>::Destruct [0x05C1704C+12] 15:14:22.485 352 base::RefCountedThreadSafe<IPC::MessageFilter,base::DefaultRefCountedThreadSafeTraits<IPC::MessageFilter> >::Release [0x05C18D92+82] 15:14:22.485 352 scoped_refptr<IPC::MessageFilter>::Release [0x05C18DEE+14] 15:14:22.485 352 scoped_refptr<IPC::MessageFilter>::~scoped_refptr<IPC::MessageFilter> [0x05C13CD1+33] 15:14:22.485 352 scoped_refptr<IPC::MessageFilter>::`scalar deleting destructor' [0x05C15E36+22] 15:14:22.485 352 std::allocator<scoped_refptr<IPC::MessageFilter> >::destroy<scoped_refptr<IPC::MessageFilter> > [0x05C11698+24] 15:14:22.485 352 std::allocator_traits<std::allocator<scoped_refptr<IPC::MessageFilter> > >::destroy<scoped_refptr<IPC::MessageFilter> > [0x05C116CF+15] 15:14:22.485 352 std::_Wrap_alloc<std::allocator<scoped_refptr<IPC::MessageFilter> > >::destroy<scoped_refptr<IPC::MessageFilter> > [0x05C1165B+27] 15:14:22.485 352 std::_Destroy_range<std::_Wrap_alloc<std::allocator<scoped_refptr<IPC::MessageFilter> > > > [0x05C103C2+34] 15:14:22.485 352 std::_Destroy_range<std::_Wrap_alloc<std::allocator<scoped_refptr<IPC::MessageFilter> > > > [0x05C10374+52] 15:14:22.485 352 std::vector<scoped_refptr<IPC::MessageFilter>,std::allocator<scoped_refptr<IPC::MessageFilter> > >::_Destroy [0x05C1A867+55] 15:14:22.485 352 std::vector<scoped_refptr<IPC::MessageFilter>,std::allocator<scoped_refptr<IPC::MessageFilter> > >::clear [0x05C1B647+55] 15:14:22.485 352 IPC::ChannelProxy::Context::OnChannelClosed [0x05C17A0F+207] Original issue's description: > base: Enable browser-wide discardable memory on Linux, CrOS and Windows. > > This makes SHMEM implementation of discardable memory preferred > over EMULATED implementation. This effectively makes SHMEM the > implementation used by default on Linux, CrOS and Windows. > > SHMEM implementation of discardable memory gives the browser > process control over the total amount of discardable memory used > and allows us to enforce a global limit of 512MB across all > renderers. > > BUG=429415,429416 > > Committed: https://crrev.com/03ea50508953461c007316ef0bf2d5c68d097d4b > Cr-Commit-Position: refs/heads/master@{#310153} TBR=avi@chromium.org,danakj@chromium.org,reveman@chromium.org NOTREECHECKS=true NOTRY=true BUG=429415,429416 Review URL: https://codereview.chromium.org/812993007 Cr-Commit-Position: refs/heads/master@{#310227}
* Further instrumentations to find jank in Windows message processing.vadimt2015-01-061-4/+24
| | | | | | | | | | | | | | | | | | Based on the latest revelations: 440919 WindowImpl::WndProc2 = 90 jph. Since the internals of OnWndProc are instrumented, this strangely indicates that it's GetWindowUserData who is responsible for this jank. Instrumenting it. 440919 <<MessagePumpForUI::ProcessNextWindowsMessage>> = 46 jph and 440919 MessagePumpForUI::ProcessMessageHelper = 39 jph This means that with instrumenting MessagePumpForUI::ProcessMessageHelper, we've divided MessagePumpForUI::ProcessNextWindowsMessage into 2 roughly equal parts: everything that happens inside MessagePumpForUI::ProcessMessageHelper, and everything outside (GetQueueStatus and PeekMessage). Adding in instrumentation to separate GetQueueStatus from PeekMessage. Also instrumenting internals of MessagePumpForUI::ProcessMessageHelper. BUG=440919 Review URL: https://codereview.chromium.org/835183002 Cr-Commit-Position: refs/heads/master@{#310156}
* base: Enable browser-wide discardable memory on Linux, CrOS and Windows.reveman2015-01-064-8/+8
| | | | | | | | | | | | | | | | | This makes SHMEM implementation of discardable memory preferred over EMULATED implementation. This effectively makes SHMEM the implementation used by default on Linux, CrOS and Windows. SHMEM implementation of discardable memory gives the browser process control over the total amount of discardable memory used and allows us to enforce a global limit of 512MB across all renderers. BUG=429415,429416 Review URL: https://codereview.chromium.org/793443003 Cr-Commit-Position: refs/heads/master@{#310153}
* Add DictionaryValue::Set and ::SetWithoutPathExpansion functionsestade2015-01-063-25/+64
| | | | | | | | | | | | that take scoped_ptr. Mark the non-scoped_ptr versions as deprecated. Update tests. Update one client. BUG=446238 Review URL: https://codereview.chromium.org/829333004 Cr-Commit-Position: refs/heads/master@{#310121}
* Clean-up: Remove base::TimeTicks::UnprotectedNow().miu2015-01-063-19/+0
| | | | | | | | | | | | | | | | | | This method was added in r222396: https://chromiumcodereview.appspot.com/23147002 However, with the current implementation of base::TimeTicks::Now(), this logic appears to be bogus. The comment in TrackedTime::Now() thinks this method provides a lock-free execution of the timeGetTime() function, but that is only the case on older systems without an efficient QPC implementation. Furthermore, for those older systems, the overhead in processing for the "rollover-protected" timestamp is negligible (~20ns, according to benchmarking; compare this to the 1.0 ms to 15.6 ms precision of the clock). Review URL: https://codereview.chromium.org/829113002 Cr-Commit-Position: refs/heads/master@{#310039}
* Added checks for use after free of PrefServicebattre2015-01-051-0/+14
| | | | | | | | BUG=435208 Review URL: https://codereview.chromium.org/833163002 Cr-Commit-Position: refs/heads/master@{#309925}
* Instrumenting more WM_ message processing methods to find jank.vadimt2015-01-021-0/+5
| | | | | | | | | | | | | | | Latest numbers: WindowImpl::WndProc2 == 76 jph <<MessagePumpForUI::ProcessNextWindowsMessage>> == 66 jph (this is the jank in MessagePumpForUI::ProcessNextWindowsMessage, but outside any other ScopedTracker) Instrumenting further. BUG=440919 Review URL: https://codereview.chromium.org/829843002 Cr-Commit-Position: refs/heads/master@{#309857}
* Disable MacUtilTest.TestExcludeFileFromBackups, flaking a lot on Mac 10.8 ↵Dan Beam2014-12-301-1/+2
| | | | | | | | | | testers. BUG=425745 Review URL: https://codereview.chromium.org/828043002 Cr-Commit-Position: refs/heads/master@{#309762}
* Disable DiscardableMemoryTest.AddressSpace under AddressSanitizer on Windowstimurrrr2014-12-291-0/+4
| | | | | | | | BUG=445058 Review URL: https://codereview.chromium.org/826763003 Cr-Commit-Position: refs/heads/master@{#309714}
* Remove deprecated methods from Pickle.avi2014-12-282-116/+47
| | | | | | | | | | | | | BUG=444578 TEST=none R=nasko@chromium.org TBR=ben@chromium.org Committed: https://chromium.googlesource.com/chromium/src/+/b740bfe23ae7ad244356a4a7538b95ae560251db Review URL: https://codereview.chromium.org/818833004 Cr-Commit-Position: refs/heads/master@{#309691}
* Revert of Remove deprecated methods from Pickle. (patchset #10 id:180001 of ↵avi2014-12-282-47/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/818833004/) Reason for revert: Allegedly causes a performance hit: http://crbug.com/445173 Original issue's description: > Remove deprecated methods from Pickle. > > BUG=444578 > TEST=none > R=nasko@chromium.org > TBR=ben@chromium.org > > Committed: https://chromium.googlesource.com/chromium/src/+/b740bfe23ae7ad244356a4a7538b95ae560251db TBR=nasko@chromium.org NOTREECHECKS=true NOTRY=true BUG=444578 Review URL: https://codereview.chromium.org/825353003 Cr-Commit-Position: refs/heads/master@{#309689}
* Make callers of CommandLine use it via the base:: namespace, and remove the ↵avi2014-12-252-3/+1
| | | | | | | | | | | | global alias. BUG=422426 TEST=none TBR=ben@chromium.org Review URL: https://codereview.chromium.org/812353003 Cr-Commit-Position: refs/heads/master@{#309644}
* base: Add free list implementation to browser-wide discardable memory system.reveman2014-12-244-21/+50
| | | | | | | | | | | | | | | | | | This adds a free list to the browser-wide discardable memory manager in child processes. This reduces the number of open file descriptors and improves performance significantly by avoiding a lot of browser process round-trips. Address-ordered best-fit policy is currently used as it is more likely to result in fewer locked segments but the policy can easily be adjusted if needed. BUG=429415 TEST=content_unittests --gtest_filter=DiscardableSharedMemoryHeapTest.* Review URL: https://codereview.chromium.org/807303002 Cr-Commit-Position: refs/heads/master@{#309595}
* Revert of Revert "Update legacy Tuple-using code." (patchset #1 id:1 of ↵avi2014-12-231-65/+0
| | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/826573002/) Reason for revert: The tests should have failed with this. Undoing the revert. Original issue's description: > Revert "Update legacy Tuple-using code." > > This reverts commit 12f4b98357b9dedc93cb546aac0aece2c8d9e850 > > BUG=440675, 444827 > > Committed: https://chromium.googlesource.com/chromium/src/+/85748694f2a119a057088f77f70b97f11607473c TBR= NOTREECHECKS=true NOTRY=true BUG=440675, 444827 Review URL: https://codereview.chromium.org/794073003 Cr-Commit-Position: refs/heads/master@{#309586}
* Revert "Update legacy Tuple-using code."Avi Drissman2014-12-231-0/+65
| | | | | | | | | | This reverts commit 12f4b98357b9dedc93cb546aac0aece2c8d9e850 BUG=440675, 444827 Review URL: https://codereview.chromium.org/826573002 Cr-Commit-Position: refs/heads/master@{#309583}
* Standardize usage of virtual/override/final specifiers in base/.dcheng2014-12-2344-116/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Google C++ style guide states: Explicitly annotate overrides of virtual functions or virtual destructors with an override or (less frequently) final specifier. Older (pre-C++11) code will use the virtual keyword as an inferior alternative annotation. For clarity, use exactly one of override, final, or virtual when declaring an override. To better conform to these guidelines, the following constructs have been rewritten: - if a base class has a virtual destructor, then: virtual ~Foo(); -> ~Foo() override; - virtual void Foo() override; -> void Foo() override; - virtual void Foo() override final; -> void Foo() final; This patch was automatically generated. The clang plugin can generate fixit hints, which are suggested edits when it is 100% sure it knows how to fix a problem. The hints from the clang plugin were applied to the source tree using the tool in https://codereview.chromium.org/598073004. Several formatting edits by clang-format were manually reverted, due to mangling of some of the more complicate IPC macros. BUG=417463 Review URL: https://codereview.chromium.org/804533005 Cr-Commit-Position: refs/heads/master@{#309527}
* Simplify observer_list_threadsafe.h using a variadic template.thakis2014-12-231-45/+14
| | | | | | | | | | | Made possible by the new Tuple implementation. No intended behavior change. BUG=440675 Review URL: https://codereview.chromium.org/818123002 Cr-Commit-Position: refs/heads/master@{#309515}
* Remove deprecated methods from Pickle.Avi Drissman2014-12-222-116/+47
| | | | | | | | | | | BUG=444578 TEST=none R=nasko@chromium.org TBR=ben@chromium.org Review URL: https://codereview.chromium.org/818833004 Cr-Commit-Position: refs/heads/master@{#309445}
* Update legacy Tuple-using code.Avi Drissman2014-12-224-118/+53
| | | | | | | | | | | BUG=440675 TEST=no change R=mdempsky@chromium.org, thakis@chromium.org TBR=ben@chromium.org Review URL: https://codereview.chromium.org/821453003 Cr-Commit-Position: refs/heads/master@{#309441}
* Switch users of foundation_util.h to include it directly and clean up uses ↵avi2014-12-213-4/+2
| | | | | | | | | | | | | of mac_util.h. BUG=none TEST=none TBR=ben@chromium.org NOTRY=TRUE Review URL: https://codereview.chromium.org/817153002 Cr-Commit-Position: refs/heads/master@{#309368}
* Linux: Fix an out of bound error in FilePathWatcherImpl::OnFilePathChanged.thestig2014-12-191-9/+32
| | | | | | | | BUG=406129 Review URL: https://codereview.chromium.org/792803006 Cr-Commit-Position: refs/heads/master@{#309286}
* Revert of DevTools: Parallelize trace messages serialization. (patchset #7 ↵fmeawad2014-12-192-29/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:140001 of https://codereview.chromium.org/750183008/) Reason for revert: Speculatively reverting this CL as it might be related to redness in the perf bots. The new crashes on the bots all had this CL in their range, and the crashes are all related to MemoryError while receiving trace data. (crbug.com/443398) Feel free to reland if the revert does not fix the issue. Original issue's description: > DevTools: Parallelize trace messages serialization. > > Move serialization into a worker thread. As a result > IO thread will be able to send messages to the browser. > > The original implementation did serialization on IO thread > and was not able to send the messages because ipc had > is_blocked_on_write_ = true and had no chance to check > the actual state of the channel. So the messages were > collected in output_queue. Also the messages could be quite > big and could block the IO thread for a long time. > > BUG= > > Committed: https://crrev.com/d58e06aafd6572e681f9d30f313bf5393db9f2bc > Cr-Commit-Position: refs/heads/master@{#308773} TBR=nduca@chromium.org,pfeldman@chromium.org,caseq@chromium.org,yurys@chromium.org,wangxianzhu@chromium.org,skyostil@google.com,dsinclair@chromium.org,skyostil@chromium.org,loislo@chromium.org NOTREECHECKS=true NOTRY=true BUG=443398 Review URL: https://codereview.chromium.org/804083004 Cr-Commit-Position: refs/heads/master@{#309257}
* Allow managing Camera and Location for Supervised Userskhannans2014-12-194-0/+24
| | | | | | | | BUG=440721 Review URL: https://codereview.chromium.org/789173002 Cr-Commit-Position: refs/heads/master@{#309208}
* remove some dead visual studio < 2013 codemostynb2014-12-193-30/+1
| | | | | | | | | | | | We only support building for windows with Visual Studio 2013 Update 4 now, so let's remove dead code that is only used for older Visual Studio versions. BUG=442035,158570 Review URL: https://codereview.chromium.org/798163004 Cr-Commit-Position: refs/heads/master@{#309187}
* More wiring for server autofill data.brettw2014-12-191-1/+1
| | | | | | | | | | | | | | Added new vectors of server cards and profiles in the personal data manager. These are populated via a query on the DB and merged to produce the final results. These will currently always be empty because no data is ever added to the database. There is also no effort at ranking or de-duping. I mostly re-wrote PersonalDataManager::GetProfileSuggestions. Originally I was trying to add de-duping into it and the old (rather confusing) structure made this difficult. I put off de-duping to a future patch but kept this refactor since I think it's clearer. Added some more lenient profile string comparisons. These apply both for prefix matching (when autofill is used like autocomplete) and in when matching previous input. It now does i81n-aware lowercasing and ignores punctuation (my primary goal is to treat things like "Rd" and "Rd." the same since I was concerned the server might be doing some canonicalization, but this fixes some other cases as well and I think is worthwhile). Removed the filtering in GetProfileSuggestions and just made autofill_dialog_controller_impl.cc (the only consumer who used this parameter) filter the results afterwards. Review URL: https://codereview.chromium.org/808693002 Cr-Commit-Position: refs/heads/master@{#309140}
* Fixes for Clang plugin checks in base/dmichael2014-12-188-52/+104
| | | | | | | | | | | The Clang Chromium "FindBadConstructs" plugin currently ignores templates and PODs (see the bug). This fixes some of the latent issues found in base/. BUG=441916 Review URL: https://codereview.chromium.org/806223004 Cr-Commit-Position: refs/heads/master@{#309088}
* Make wstring StringPrintf() functions Windows only.thestig2014-12-183-17/+16
| | | | | | Review URL: https://codereview.chromium.org/807913004 Cr-Commit-Position: refs/heads/master@{#309084}
* base: Add ashmem support to base::DiscardableSharedMemory implementation.reveman2014-12-188-67/+275
| | | | | | | | | | | | | | | | This adjust the base::DiscardableSharedMemory API to to support ashmem and locking/unlocking of individual pages. This API change will also be used in the near future to implement a child process side free list on top of the base::DiscardableSharedMemory API. BUG=429415 TEST=base_unittests --gtest_filter=DiscardableSharedMemoryTest.LockAndUnlockRange Review URL: https://codereview.chromium.org/809603004 Cr-Commit-Position: refs/heads/master@{#309054}
* Avoid a string copy for every CommandLine::HasSwitch queryjdduke2014-12-171-2/+4
| | | | | | | | | | | | | | | Windows performs a lower-case conversion of all strings passed to CommandLine::HasSwitch. Other platforms require no such conversion, however, currently they pay for an associated string copy on each query. Why? Because compilers aren't as smart as they should be. Remove this string copy for non-Windows platforms. A string copy saved is a string copy earned. BUG=405348 Review URL: https://codereview.chromium.org/815543002 Cr-Commit-Position: refs/heads/master@{#308839}
* Removing the |MemoryPressureObserverChromeOS::MemoryPressureLevel| enum.skuhne2014-12-172-53/+17
| | | | | | | | | BUG=- TEST=- Review URL: https://codereview.chromium.org/812733002 Cr-Commit-Position: refs/heads/master@{#308815}
* DevTools: Parallelize trace messages serialization.loislo2014-12-172-12/+29
| | | | | | | | | | | | | | | | | | Move serialization into a worker thread. As a result IO thread will be able to send messages to the browser. The original implementation did serialization on IO thread and was not able to send the messages because ipc had is_blocked_on_write_ = true and had no chance to check the actual state of the channel. So the messages were collected in output_queue. Also the messages could be quite big and could block the IO thread for a long time. BUG= Review URL: https://codereview.chromium.org/750183008 Cr-Commit-Position: refs/heads/master@{#308773}
* Extending the memory pressure system by adding one more state to denote a ↵skuhne2014-12-172-8/+10
| | | | | | | | | | | | | | | lack of memory pressure. This CL is adding one more state to the resource pressure states to allow a system state query to use the pressure value. Please see go/chromeosresourcepressure for more information. BUG=439493 TEST=Since there are no users of the new state, this cannot be "tested" yet. Review URL: https://codereview.chromium.org/782053002 Cr-Commit-Position: refs/heads/master@{#308696}
* Removed discrepancy in low-end-device-mode flagssid2014-12-165-23/+19
| | | | | | | | | | Removed the flag low-end-device-mode and added two flags enable-low-end-device-mode and disable-low-end-device-mode. This removes discrepancies between the flag values (integers) when used in different platforms and makes it simple to use with the just the flags and no values passed. BUG=437778 Review URL: https://codereview.chromium.org/761783004 Cr-Commit-Position: refs/heads/master@{#308593}
* tuple: leave fields uninitialized in default constructorsmdempsky2014-12-151-2/+2
| | | | | | | | | | | | | | Using "x()" in TupleLeaf's default constructor causes primitive types (e.g., integers and pointers) to be zero initialized, whereas previously Tuple left them indeterminate. Arguably zero-initializing is better, but the change was inadvertant and results in a measurable code size increase, so this CL reverts it (at least for now). BUG=440806 Review URL: https://codereview.chromium.org/791883003 Cr-Commit-Position: refs/heads/master@{#308455}
* android: Remove TraceEvent.begin()/end()boliu2014-12-151-36/+0
| | | | | | | | | | | All callers have been moved to onens with explicit event names. Removing the expensive dumping stack implemntation. BUG=439118 Review URL: https://codereview.chromium.org/803603002 Cr-Commit-Position: refs/heads/master@{#308356}
* Mark as unused the "Closing" UMA entry in ImportantFile.TempFileFailures.tnagel2014-12-151-1/+5
| | | | | | | | BUG=none Review URL: https://codereview.chromium.org/689673002 Cr-Commit-Position: refs/heads/master@{#308341}
* Avoid scheduling a message loop that we know is not sleepingjamesr2014-12-135-22/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When tasks are posted to a message loop, we may need to schedule the message loop to wake up if it was sleeping so it processes the message. The incoming task queue checks whether the incoming queue was already empty as a way to avoid scheduling unnecessarily, but we can be more precise. Once a message loop is scheduled, we know that it will sooner or later wake up and enter its run loop. In its run loop it will repeatedly drain the work queue and attempt to reload from the incoming queue until there is no work immediately available to do. This means that before waiting for more work the loop will always reload from an empty incoming queue. Thus, once we schedule a loop we do not need to schedule the same loop again until after an empty reload occurs. This adds a bool to IncomingTaskQueue protected by the incoming task queue lock that keeps track of if the loop has been scheduled since the last empty reload. Local testing on Linux desktop and a ChromeShell Android build shows that this avoids roughly 40% of the ScheduleWork calls when browsing around to random websites. This also has the very nice consequence that when running a task and posting another task to the same thread we *never* need to invoke ScheduleWork which avoids the cost of the ScheduleWork call and avoids a spurious wakeup when going to sleep. BUG=412137 Review URL: https://codereview.chromium.org/614723003 Cr-Commit-Position: refs/heads/master@{#308221}
* Misc. warning fixes/cleanuppkasting2014-12-121-1/+1
| | | | | | | | | BUG=81439 TEST=none Review URL: https://codereview.chromium.org/777853003 Cr-Commit-Position: refs/heads/master@{#308182}
* Tracing: make filtering logic more intuitive for multiple categoriescaseq2014-12-123-34/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the way category filter processes multi-categories groups. Previously, adding a disabled-by-default- category to a regular category would prevent the event from matching filter if only regular category is enabled. This is somewhat counter-intuitive, the expected behavior is that each category is processed by the filter independently. The new logic is: 1. if at least one category in event category group matches at least one category enabled in the filter, the event passes; 2. if at least one category in event category group matches at least one category explicitly excluded in the filter, the event is filtered out; 3. the event is passed by default, if included categories list is empty and event has at least one category that is not disabled-by-default-. Note no existing tests were modified (though I'm not sure if (2) should be the way it is). BUG= Review URL: https://codereview.chromium.org/788243003 Cr-Commit-Position: refs/heads/master@{#308136}