summaryrefslogtreecommitdiffstats
path: root/base/threading/thread_checker_impl.cc
Commit message (Collapse)AuthorAgeFilesLines
* make debug mode ~20% faster on linuxhubbe@chromium.org2014-05-241-6/+6
| | | | | | | | | | | | | | I was doing some benchmarking on tests on linux, and noticed that 10-20% of time was in ThreadCheckerImpl::CalledOnValidThread. I looked into it and found that we're doing a syscall to get the thread ID, which is not needed on any platform where pthread_t is already an integer type. Replacing that syscall with pthread_self() makes this particular test (End2EndTest.BasicFakeSoftwareVideo) go from 488ms to 374ms, which is a 20% speedup. While other tests might not use ThreadChecker quite as much, it should still be a pretty good win across a large set of tests. Review URL: https://codereview.chromium.org/292873002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272725 0039d316-1c4b-4281-b951-d872f2087c98
* Modify ThreadChecker and NonThreadSafe so that theirjoi@chromium.org2011-03-031-0/+34
functionality is available in release builds if explicitly requested by using their Impl types. The default usage remains that they do nothing in release mode. Also, update unit tests to run in release mode, verifying that the release versions of NonThreadSafe and ThreadChecker do nothing in release builds. BUG=none TEST=base unit tests Review URL: http://codereview.chromium.org/6599004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76833 0039d316-1c4b-4281-b951-d872f2087c98