summaryrefslogtreecommitdiffstats
path: root/base/threading
Commit message (Collapse)AuthorAgeFilesLines
* Avoid holding the lock while we do alarm processingjar@chromium.org2011-11-301-1/+4
| | | | | | | r=rtenneti Review URL: http://codereview.chromium.org/8686011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112144 0039d316-1c4b-4281-b951-d872f2087c98
* Make ThreadLocalStorage more posix pthread compliantjar@chromium.org2011-11-293-30/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is my first shot at cleaning up the implementation. 1) I support multiple calls to destructors, as suggested in pthread standards 2) I added volatile so that the destructors can't cause any compiler confusion if they are nulled out while a second thread is calling the list of destructors. 3) Windows already avoids producing a key which has value zero <good!>, but I added some DHECKs to make this fact more obvious. I plan to try to enforce that in the posix is similarly constrained... but that will be in a future CL. 4) I did some extra cleaning of destructor handling, so that it is plausible that TCMalloc can use this service (and not have to hack its own). The problem *was* that initialization called new, which would trigger allocation activities before a thread local heap could be setup <sigh>. This is now fixed (in this CL). I also handled the destructor calls with greater care, avoiding calling delete after all the destructors have been called (as that would re-incarnate a TCMalloc heap). This is also fixed. r=willchan BUG=105410 Review URL: http://codereview.chromium.org/8702014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112030 0039d316-1c4b-4281-b951-d872f2087c98
* Allow const pointers to be stored in ThreadLocalPointer.jbates@chromium.org2011-11-291-1/+2
| | | | | | Review URL: http://codereview.chromium.org/8666010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112021 0039d316-1c4b-4281-b951-d872f2087c98
* Remove several more custom Task implementations from base/dcheng@chromium.org2011-11-291-81/+50
| | | | | | | | | | | BUG=none TEST=trybots Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=111865 Review URL: http://codereview.chromium.org/8702016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111879 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 111865 - Remove several more custom Task implementations from base/dcheng@chromium.org2011-11-291-50/+81
| | | | | | | | | | | | BUG=none TEST=trybots Review URL: http://codereview.chromium.org/8702016 TBR=dcheng@chromium.org Review URL: http://codereview.chromium.org/8729020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111868 0039d316-1c4b-4281-b951-d872f2087c98
* Remove several more custom Task implementations from base/dcheng@chromium.org2011-11-291-81/+50
| | | | | | | | | BUG=none TEST=trybots Review URL: http://codereview.chromium.org/8702016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111865 0039d316-1c4b-4281-b951-d872f2087c98
* callback_forward.h forward-declares base::Callback and base::Closure.erikwright@chromium.org2011-11-282-2/+2
| | | | | | | | | | | | | | This CL includes callback_forward.h and a number of files that depend on it. Other CLs have been sent to other reviewers, according to OWNERS files. This search shows the other CLs: http://goo.gl/vzQoJ See this chromium-dev thread for the rationale behind the change: http://goo.gl/I3kob BUG=None TEST=Compiles Review URL: http://codereview.chromium.org/8702019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111782 0039d316-1c4b-4281-b951-d872f2087c98
* Remove custom Task implementations in base.dcheng@chromium.org2011-11-234-52/+29
| | | | | | | | | | | | I left a few unconverted in this one, because they made my head hurt. BUG=none TEST=base_unittests Review URL: http://codereview.chromium.org/8653006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111407 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Convert chrome_frame/.jhawkins@chromium.org2011-11-181-1/+1
| | | | | | | | | | | BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8555001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110744 0039d316-1c4b-4281-b951-d872f2087c98
* ChromeFrame: Convert TaskMarshallerThroughMessageQueue to new Callback system.jhawkins@chromium.org2011-11-171-3/+1
| | | | | | | | | | | BUG=none TEST=none R=willchan@chromium.org,stoyan@chromium.org Review URL: http://codereview.chromium.org/8591009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110595 0039d316-1c4b-4281-b951-d872f2087c98
* Add OVERRIDE to base/.avi@chromium.org2011-11-164-7/+10
| | | | | | | | | BUG=104314 TEST=no change Review URL: http://codereview.chromium.org/8520018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110218 0039d316-1c4b-4281-b951-d872f2087c98
* base: Refactor PendingTask out of MessageLoop.jhawkins@chromium.org2011-11-153-60/+13
| | | | | | | | | | | | | Also removes copy/pasted instances of this class. BUG=none TEST=none R=willchan@chromium.org Review URL: http://codereview.chromium.org/8565024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110206 0039d316-1c4b-4281-b951-d872f2087c98
* Allow linker initialization of lazy instancejoth@chromium.org2011-11-156-10/+11
| | | | | | | | | | | | | | Using the initializer list construct = {0} allows the object to be linker initialized. Modify the LazyInstance class design to make it a pod aggregate type that can be linker initialized this way. Also combines the instance and state members, in line with the Singleton<> class design. Introduces a new LAZY_INSTANCE_INITIALIZER macro specifically for using to init all lazy instances + modify all existing callsites to use it. (Old code would no longer compile) BUG=94925 TEST=existing tests pass. http://build.chromium.org/f/chromium/perf/linux-release/sizes/report.html?history=150&header=chrome-si&graph=chrome-si&rev=-1 should step downward. TBR=jam@chromium.org,rvargas@chromium.org,darin@chromium.org,ben@chromium.org,apatrick@chromium.org,akalin@chromium.org Review URL: http://codereview.chromium.org/8491043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110076 0039d316-1c4b-4281-b951-d872f2087c98
* Set the profiler's thread name at a central placejar@chromium.org2011-11-153-13/+21
| | | | | | | | | | | | | | | | | This will automatically catch thread names in several of the child processes we are after, and it also catches the name for a webkcore thread. The underlying function uses a try/catch clause, which contaminates the entire function. As a result, I needed to factor out that section, so that I could still call to set the profiler thread name. Without this, the shared dbg build will fail to compile. r=rtenneti Review URL: http://codereview.chromium.org/8565036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110003 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 109962 - Revert 109903 - Revert 109898 - Set the profiler's thread ↵kmadhusu@chromium.org2011-11-143-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | name at a central place [I've removed the code, via a separate CL, that DCHECK() earlier today] This will automatically catch thread names in several of the child processes we are after, and it also catches the name for a webkcore thread. r=rtenneti Review URL: http://codereview.chromium.org/8558003 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/8564014 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/8565030 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/8555022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109980 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 109903 - Revert 109898 - Set the profiler's thread name at a central ↵jar@chromium.org2011-11-143-2/+5
| | | | | | | | | | | | | | | | | | | | | place [I've removed the code, via a separate CL, that DCHECK() earlier today] This will automatically catch thread names in several of the child processes we are after, and it also catches the name for a webkcore thread. r=rtenneti Review URL: http://codereview.chromium.org/8558003 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/8564014 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/8565030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109962 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 109898 - Set the profiler's thread name at a central placejar@chromium.org2011-11-143-5/+2
| | | | | | | | | | | | | | This will automatically catch thread names in several of the child processes we are after, and it also catches the name for a webkcore thread. r=rtenneti Review URL: http://codereview.chromium.org/8558003 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/8564014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109903 0039d316-1c4b-4281-b951-d872f2087c98
* Set the profiler's thread name at a central placejar@chromium.org2011-11-143-2/+5
| | | | | | | | | | | This will automatically catch thread names in several of the child processes we are after, and it also catches the name for a webkcore thread. r=rtenneti Review URL: http://codereview.chromium.org/8558003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109898 0039d316-1c4b-4281-b951-d872f2087c98
* Adjust interfaces to indicate when tracking is in progressjar@chromium.org2011-11-142-4/+5
| | | | | | | | | | | | | | | This should have no change whatever in function, but simply changes the names of calls for tracking time so that the ThreadData can know if a new trackig has started or ended. This will be helpful in (a future CL) measuring when the thread is doing something that is not tracked at all (e.g., processing UI events, etc.) r=rtenneti Review URL: http://codereview.chromium.org/8548005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109846 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup at end of TLS test by freeing slotjar@chromium.org2011-11-101-1/+2
| | | | | | | | | | | | I noticed that all threads in the unit tests that run after the TLS test call the TLS test destructor as their threads go away. This interaction between tests doesn't seem good... so I added a free call. r=darin Review URL: http://codereview.chromium.org/8507015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109446 0039d316-1c4b-4281-b951-d872f2087c98
* A couple comment updatesjoth@chromium.org2011-11-082-1/+2
| | | | | | | | | | | | | Add a comment to worker pool, as on first reading it I thought there was a bug with name going out of scope. + a minor fix the thread.h BUG=None TEST=None Review URL: http://codereview.chromium.org/8463004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109002 0039d316-1c4b-4281-b951-d872f2087c98
* Remove 1 exit time destructor and 1 static initializer from watchdog.ccthakis@chromium.org2011-11-042-30/+33
| | | | | | | | | | | | | | This file will now leak a lock at exit time. Also move the static data from the .h to the .cc file. BUG=101600, 94925 TEST=none Review URL: http://codereview.chromium.org/8453001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108597 0039d316-1c4b-4281-b951-d872f2087c98
* Remove 1 exit time destructor and 1 static initializer from ↵thakis@chromium.org2011-11-032-7/+20
| | | | | | | | | | | | platform_thead_(posix|mac) BUG=101600,94925 TEST=none Review URL: http://codereview.chromium.org/8436007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108579 0039d316-1c4b-4281-b951-d872f2087c98
* Remove base::Thread::CleanUpAfterMessageLoopDestruction() because it is ↵rsesek@chromium.org2011-11-031-5/+0
| | | | | | | | | | | | unused and it does nothing. BUG=none TEST=none Review URL: http://codereview.chromium.org/8440055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108502 0039d316-1c4b-4281-b951-d872f2087c98
* Thread::Stop() must be called before any subclass's destructor completes.joi@chromium.org2011-11-022-6/+13
| | | | | | | | | | | Update base::Thread documentation, fix all subclasses I could find that had a problem, and remove no-longer-necessary suppressions. BUG=102134 Review URL: http://codereview.chromium.org/8427007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108296 0039d316-1c4b-4281-b951-d872f2087c98
* Enable tracking of objects by defaultjar@chromium.org2011-10-314-32/+19
| | | | | | | | | | | | | | | | | | | This is a reland of accumulated patches including CLs 8414036, 8425010, 8425013, 8424013. It fully enables tracking of objects, as seen in about:tracking in teh release build. The problem this had in its initaial landing centered on Mac instability in base_unittest. We were encountering crash on exit of the tests, with a stack dump involving pthreads. r=rtenneti BUG=101856 Review URL: http://codereview.chromium.org/8429009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108026 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 107895 - Fully enable about:tracking by defaultjoth@chromium.org2011-10-314-19/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a re-land of: http://codereview.chromium.org/8391019/ Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107793 Original landing had trouble with message_loop_x.h, due to header include ordering. I pulled out the structure that was really needed by tracked_objects.h into a new file tracked_info.*. This allows tracked_objects to inlude this tracked_info, but not have to include the message_loop.h totality. I also removed a DCHECK that that was triggering on a test, and added yet one more file (browser_main.cc) where I removed a #ifdef for TRACKING_ALL_OBJECTS. The changes were minor, and I'm hoping to get clear perf runs with tihs landing, so I'm going to TBR it and reland early in the morning. Comments from original landing: Support is now controlled by the flag: --enable-tracking and the default is always on. To turn it off, use: --enable-tracking=0 All profiler code is compiled now in release and official builds (in addition to debug, where it was already active), but most entry points can be disabled (turned into no-ops) by a single const bool setting atop tracked_objects.cc (in case folks want to revert the perf-impact of this change). Transition to faster Now() service on Windows for the profiler use only. The TimeTicks::Now() function on Window uses locking to get a 64 bit time value. This CL transitions times used for profiling to more directly use a 32 bit Time interface, which is actually what drives the 64 bit TimeTicks. By using the smaller value, we avoid the need for locks, or even atomic operations for the most part in the tracking system. On linux, we just down-sample the standard TimeTicks to 32 bits for consistency (clean ability to snapshot asyncronously without atomics... but I should verify that such is helpful to performance). I've also put in yet more cleanup and refactoring. tbr=rtenneti bug=101856 Review URL: http://codereview.chromium.org/8414036 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/8430004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107961 0039d316-1c4b-4281-b951-d872f2087c98
* Revert log change to thread_local_win to fix an internal compiler error whenbrettw@chromium.org2011-10-311-1/+1
| | | | | | | | | doing official Chrome builds. TBR=1aforge Review URL: http://codereview.chromium.org/8424004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107910 0039d316-1c4b-4281-b951-d872f2087c98
* Fully enable about:tracking by defaultjar@chromium.org2011-10-304-32/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a re-land of: http://codereview.chromium.org/8391019/ Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107793 Original landing had trouble with message_loop_x.h, due to header include ordering. I pulled out the structure that was really needed by tracked_objects.h into a new file tracked_info.*. This allows tracked_objects to inlude this tracked_info, but not have to include the message_loop.h totality. I also removed a DCHECK that that was triggering on a test, and added yet one more file (browser_main.cc) where I removed a #ifdef for TRACKING_ALL_OBJECTS. The changes were minor, and I'm hoping to get clear perf runs with tihs landing, so I'm going to TBR it and reland early in the morning. Comments from original landing: Support is now controlled by the flag: --enable-tracking and the default is always on. To turn it off, use: --enable-tracking=0 All profiler code is compiled now in release and official builds (in addition to debug, where it was already active), but most entry points can be disabled (turned into no-ops) by a single const bool setting atop tracked_objects.cc (in case folks want to revert the perf-impact of this change). Transition to faster Now() service on Windows for the profiler use only. The TimeTicks::Now() function on Window uses locking to get a 64 bit time value. This CL transitions times used for profiling to more directly use a 32 bit Time interface, which is actually what drives the 64 bit TimeTicks. By using the smaller value, we avoid the need for locks, or even atomic operations for the most part in the tracking system. On linux, we just down-sample the standard TimeTicks to 32 bits for consistency (clean ability to snapshot asyncronously without atomics... but I should verify that such is helpful to performance). I've also put in yet more cleanup and refactoring. tbr=rtenneti bug=101856 Review URL: http://codereview.chromium.org/8414036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107895 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 107793 - Fully enable about:tracking by defaultjar@chromium.org2011-10-284-19/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support is now controlled by the flag: --enable-tracking and the default is always on. To turn it off, use: --enable-tracking=0 All profiler code is compiled now in release and official builds (in addition to debug, where it was already active), but most entry points can be disabled (turned into no-ops) by a single const bool setting atop tracked_objects.cc (in case folks want to revert the perf-impact of this change). Transition to faster Now() service on Windows for the profiler use only. The TimeTicks::Now() function on Window uses locking to get a 64 bit time value. This CL transitions times used for profiling to more directly use a 32 bit Time interface, which is actually what drives the 64 bit TimeTicks. By using the smaller value, we avoid the need for locks, or even atomic operations for the most part in the tracking system. On linux, we just down-sample the standard TimeTicks to 32 bits for consistency (clean ability to snapshot asyncronously without atomics... but I should verify that such is helpful to performance). I've also put in yet more cleanup and refactoring. r=rtenneti bug=101856 Review URL: http://codereview.chromium.org/8391019 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/8400073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107799 0039d316-1c4b-4281-b951-d872f2087c98
* Fully enable about:tracking by defaultjar@chromium.org2011-10-284-32/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support is now controlled by the flag: --enable-tracking and the default is always on. To turn it off, use: --enable-tracking=0 All profiler code is compiled now in release and official builds (in addition to debug, where it was already active), but most entry points can be disabled (turned into no-ops) by a single const bool setting atop tracked_objects.cc (in case folks want to revert the perf-impact of this change). Transition to faster Now() service on Windows for the profiler use only. The TimeTicks::Now() function on Window uses locking to get a 64 bit time value. This CL transitions times used for profiling to more directly use a 32 bit Time interface, which is actually what drives the 64 bit TimeTicks. By using the smaller value, we avoid the need for locks, or even atomic operations for the most part in the tracking system. On linux, we just down-sample the standard TimeTicks to 32 bits for consistency (clean ability to snapshot asyncronously without atomics... but I should verify that such is helpful to performance). I've also put in yet more cleanup and refactoring. r=rtenneti bug=101856 Review URL: http://codereview.chromium.org/8391019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107793 0039d316-1c4b-4281-b951-d872f2087c98
* Replace most LOG/CHECK statements with DLOG/DCHECK statements in base.brettw@chromium.org2011-10-267-11/+11
| | | | | | | | | | | [ Reland of 107042 http://codereview.chromium.org/8368009 ] I tried hard not to change CHECKs that had side effects. I kept fatal checks that seemed security or debugging-info (in crash reports) sensitive, and ones that seems particularly well-conceived. Review URL: http://codereview.chromium.org/8341026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107434 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 107042 - Replace most LOG/CHECK statements with DLOG/DCHECK ↵brettw@chromium.org2011-10-257-11/+11
| | | | | | | | | | | | | | statements in base. I tried hard not to change CHECKs that had side effects. I kept fatal checks that seemed security or debugging-info (in crash reports) sensitive, and ones that seems particularly well-conceived. Review URL: http://codereview.chromium.org/8368009 TBR=brettw@chromium.org Review URL: http://codereview.chromium.org/8351025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107051 0039d316-1c4b-4281-b951-d872f2087c98
* Replace most LOG/CHECK statements with DLOG/DCHECK statements in base.brettw@chromium.org2011-10-257-11/+11
| | | | | | | | | I tried hard not to change CHECKs that had side effects. I kept fatal checks that seemed security or debugging-info (in crash reports) sensitive, and ones that seems particularly well-conceived. Review URL: http://codereview.chromium.org/8368009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107042 0039d316-1c4b-4281-b951-d872f2087c98
* Support JSON encoding of data for about:tracking informationjar@chromium.org2011-10-242-2/+4
| | | | | | | | | | | I also fought a terrible (but educational) fight with Thread Local Store, and its ability to do cleanup (call destructors) at thread exit (notably applicable to Worker Threads). Thta is why there were soooo many test bot runs and tiny checkins. I now have a plan in mind that won't rely on that functionality. The code seems to work cross-platform, but if I have trouble with Linux, I'll repeatedly leak ThreadData contexts temporarily on that platform. Given that the code is only enabled under Debug, this is not yet a real problem. Each CL I write for this code also includes a bunch of cleanup. In this case, I changed the Write() methods to WriteHTML(), since I didn't want any confusion with JSON writing etc. I also did a bunch of tiny cleanups which should not have changed what the code does. r=rtenneti Review URL: http://codereview.chromium.org/8313013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106952 0039d316-1c4b-4281-b951-d872f2087c98
* Low-latency AudioInputStream implementation based on WASAPI for Windows.henrika@chromium.org2011-10-241-3/+13
| | | | | | | | | Requires Windows Vista or higher. BUG=none TEST=Attached unit test (requires undefined CHROME_HEADLESS) Review URL: http://codereview.chromium.org/8283032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106899 0039d316-1c4b-4281-b951-d872f2087c98
* Establish correct names for about:tracking profilerjar@chromium.org2011-10-171-0/+4
| | | | | | | | | | | | This file was mistakenly ommited from the recent landing, so the thread names were not being set (all threads other than the main thread wer assigned sequential "WorkerThread-N" names). r=eroman Review URL: http://codereview.chromium.org/8315010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105814 0039d316-1c4b-4281-b951-d872f2087c98
* base: Constantify the struct used in WprintfFormatPortabilityTest test case.tfarina@chromium.org2011-10-161-1/+1
| | | | | | | | | TEST=base_unittests --gtest_filter=StringUtilTest* R=willchan@chromium.org Review URL: http://codereview.chromium.org/8308007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105730 0039d316-1c4b-4281-b951-d872f2087c98
* Update task tracking to not depend on message_loop_ singletonjar@chromium.org2011-10-153-8/+30
| | | | | | | | | | | | | | | | | | | | | I also did a bunch of cleanup, and transitioned to tracking the duration of a run, rather than the time from posting (construction of a task) to completion of the run. It is less interesting for now to track queueing delay, and we need a focus on task execution time. I left in the hook (API) with the expectation that I'll be extending the tracked_objects code to include this as well. I also landed changes to run in Linux/Mac. The fact that I've punted on shutdown made this landing easy (all code support was previously lost during migration to some flavor of bind support). r=willchan,jam,viettrungluu,ajwong BUG=62728 Review URL: http://codereview.chromium.org/8233037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105694 0039d316-1c4b-4281-b951-d872f2087c98
* Add WorkerPool::PostTaskAndReply and use in DHCP code.joi@chromium.org2011-10-145-0/+241
| | | | | | | | | | | | | This factors out the PostTaskAndReply implementation out of MessageLoopProxy so that it can be used for any destination thread accessible via a PostTask-like interface, and uses that code from both MessageLoopProxy and WorkerPool. The DhcpProxyScriptFetcherWin and DhcpProxyScriptAdapterFetcher classes were both using a PostTaskAndReply-like mechanism with a WorkerPool thread, and on inspection it looks like there are several places in net/ where this is done, and this motivated the larger change (vs. patch set 1 which was a mechanical switch to base::Bind from NewRunnableMethod). BUG=97516 TEST=net_unittests Review URL: http://codereview.chromium.org/8139028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105512 0039d316-1c4b-4281-b951-d872f2087c98
* OpenBSD and FreeBSD fixes for base.mark@chromium.org2011-10-131-3/+2
| | | | | | | | | | | | | OpenBSD and FreeBSD need -I/usr/local/include for <execinfo.h>. Use !#/usr/bin/env bash because on !linux it's not located there. Patch by Robert Nagy <robert@openbsd.org> BUG=none TEST=none Review URL: http://codereview.chromium.org/8228005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105257 0039d316-1c4b-4281-b951-d872f2087c98
* Modify WaitableEvent::Wait() to return voidsteveblock@chromium.org2011-10-122-6/+3
| | | | | | | | | | | | | | | Currently, WaitableEvent::Wait() returns bool. However, the Windows implementation DCHECKs that the return value is true and the POSIX implementation can never return false. Also, all call sites that use the return value simply DCHECK that it's true. This change modifies the method to return void, adds a DCHECK in the POSIX implementation and updates call sites. Review URL: http://codereview.chromium.org/8221021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104990 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unnecessary #include <sys/nacl_syscalls.h>mcgrathr@chromium.org2011-10-051-4/+0
| | | | | | | | | | | | | | This header has never been needed by this code. We'd like to be able to remove it in the future. BUG= http://code.google.com/p/nativeclient/issues/detail?id=2335 TEST= none R=brettw@chromium.org Review URL: http://codereview.chromium.org/8162006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104197 0039d316-1c4b-4281-b951-d872f2087c98
* Add trace code to track all posted tasks in message_loop and WorkerThreads ↵jbates@chromium.org2011-10-033-2/+17
| | | | | | | | | | | | (non-official builds only). It's very helpful to understand what chrome is doing at runtime. Sometimes a thread in chrome does something expensive that causes a frame hitch. With this change, any expensive task will show up clearly in traces, with the file/function of where the task was posted. TEST=go to about:tracing, run a trace and notice that all tasks are traced. Review URL: http://codereview.chromium.org/7778033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103740 0039d316-1c4b-4281-b951-d872f2087c98
* Suppress benign race in ThreadTest.SleepInsideInitjochen@chromium.org2011-09-271-1/+5
| | | | | | | | | BUG=98219 TEST=none Review URL: http://codereview.chromium.org/8060011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102922 0039d316-1c4b-4281-b951-d872f2087c98
* Delete Tracked, and move Location to its own file.ajwong@chromium.org2011-09-213-4/+9
| | | | | | | | | | | | | The Birth/Death tracking of tasks has been moved out-of-band into MessageLoop's PendingTask structure. Thus, Task no longer needs to inherit from Tracked. Since Task was the only child of Tracked, delete the Tracked class and move Location to its own file. BUG=none TEST=builds Review URL: http://codereview.chromium.org/7879006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102132 0039d316-1c4b-4281-b951-d872f2087c98
* Don't DCHECK thread_policy_set() calls because they can fail during runtimecrogers@google.com2011-09-061-5/+21
| | | | | | | | BUG=95274 TEST=none Review URL: http://codereview.chromium.org/7789007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99826 0039d316-1c4b-4281-b951-d872f2087c98
* Remove some unneeded reinterpret_castsdilmah@chromium.org2011-08-261-1/+1
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/7741018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98417 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup code used to diagnose and fix bug 81449.apatrick@chromium.org2011-08-191-8/+0
| | | | | | | | | | I think it is unlikely that CloseHandle was the function that was being hooked because it is called from so many other places without problems. I am assuming that TerminateProcess was being hooked. If the symptoms of 81449 return when this is landed, this patch can be reverted. BUG=81449 Review URL: http://codereview.chromium.org/7624052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97407 0039d316-1c4b-4281-b951-d872f2087c98
* Implementation of PostTaskAndReply() in MessageLoopProxy and BrowserThread.ajwong@chromium.org2011-08-181-1/+1
| | | | | | | | | | | | | This ensures that the request/reply closures are always deleted on the origin thread, or leaked if the task cannot be completed (due to message loop shutdown). BUG=86301 TEST=new unittests Review URL: http://codereview.chromium.org/7210053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97387 0039d316-1c4b-4281-b951-d872f2087c98