summaryrefslogtreecommitdiffstats
path: root/base/tracked.cc
Commit message (Collapse)AuthorAgeFilesLines
* Rename BASE_API to BASE_EXPORT.darin@chromium.org2011-08-051-1/+1
| | | | | | | R=rvargas Review URL: http://codereview.chromium.org/7461141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95618 0039d316-1c4b-4281-b951-d872f2087c98
* Misc fixes to tracked objectsjoth@chromium.org2011-07-151-6/+7
| | | | | | | | | | | | | PendingTask::post_births could sometimes be left unitialized No way for user to know if Tracked::GetBirthPlace will hit tracked_births_ NULL pointer exception. nit: MissingBirthplace has inconsistent capitalization BUG=None TEST=base_unittests Review URL: http://codereview.chromium.org/7375006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92663 0039d316-1c4b-4281-b951-d872f2087c98
* Remove default initializtion of BirthPlace in Tracked.ajwong@chromium.org2011-06-231-3/+0
| | | | | | | | | | | | | | | | | | | | | | | Previously, MessageLoop::PostTask set the BirthPlace of the Task object (subclass of Tracked), which would decrement the counter for the Location("NoFunctionName", "NeedToSetBirthPlace", -1) Birth, and replace it with a more appropriate Location provided by the FROM_HERE argument. With the MessageLoop restructuring in r82300, tracking of Births is moved up from the Task object into the MessageLoop::PendingTask structure. The side-effect is that the default birth is never decremented, and we double count each task's creation. This default Birth is effectively a count of "tasks that were created, but not posted" without a stored reference to location, so removing it is the simplest fix to the double counting. BUG=none TEST=about:tasks looks sane. Review URL: http://codereview.chromium.org/7029038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90290 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the VS2005 build.darin@chromium.org2011-05-261-1/+4
| | | | | | | R=apatrick@chromium.org Review URL: http://codereview.chromium.org/7071015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86888 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent MSVC from inlining GetProgramCounter for LTCG builds.apatrick@chromium.org2011-05-241-0/+3
| | | | | | | | | | This should ensure that it gets the frame where FROM_HERE is used, rather than its caller. TEST=compiles BUG=81449 Review URL: http://codereview.chromium.org/7067004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86448 0039d316-1c4b-4281-b951-d872f2087c98
* Tag all tracked objects, including Tasks, with the program counter at the ↵apatrick@chromium.org2011-05-191-9/+35
| | | | | | | | | | | | | | | | site of FROM_HERE. This is to make it easier to determine the site Tasks are posted from in release builds, especially when only a minidump is available. It should help diagnose http://crbug.com/81499. I added a debug function to alias variables so that the optimizer will not strip them out if they are not live. The semantics of the MessageLoop::PostTask functions is changed and it is wrong but I am not sure what semantics are intended. It seems location information was no longer being tracked for Tasks wrapped as Closures and I don't know if this was intended. PTAL. Update: this has since been fixed. TEST=Set breakpoint in TaskClosureAdapter::Run and very that the post site can be located in an optimized build. BUG=81499 Review URL: http://codereview.chromium.org/7039020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85991 0039d316-1c4b-4281-b951-d872f2087c98
* Added task to Observer methodsdavemoore@chromium.org2010-10-261-0/+8
| | | | | | | | | | | | | By adding the task to the observer methods and GetBirthPlace() to Tracked it makes it possible to register an observer that can print more information about the tasks as they are being processed. BUG=NONE TEST=MessageLoopTest.* Review URL: http://codereview.chromium.org/4081003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63983 0039d316-1c4b-4281-b951-d872f2087c98
* Header cleanup in base.brettw@chromium.org2010-08-171-2/+2
| | | | | | | | | | | | | | This makes uses of StringPrintf and friends use the base namespace and include stringprintf.h explicitly. This also removes a bunch of unnecessary string_util includes (which exposed a few other errors like people forgetting to include <vector>. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3119022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56446 0039d316-1c4b-4281-b951-d872f2087c98
* Move implementation from header to source.erg@chromium.org2010-07-151-0/+14
| | | | | | | | | | | | | | | | | | | | This is an effort to speed up compile and link time, and also minimizing the size of the intermediary .o files on disk. For example, just moving the constructor/destructor from the classes in chrome/browser/pref_member.{cc,h} netted a 368k drop in total .o file size. In aggregate, this shrinks libbrowser.a by 10 megabytes, and a few odd megabytes on most other chrome .a files. A lot of this was done before I started harvesting what the most included symbols were across all of chrome's code. Most of them are in webkit, but there's plenty in base/ that are used everywhere to keep me busy for several patches to come. BUG=none TEST=none Review URL: http://codereview.chromium.org/3012001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52528 0039d316-1c4b-4281-b951-d872f2087c98
* Switch to using TimeTicks for profiling and histogramsjar@chromium.org2010-05-101-4/+6
| | | | | | | | | | | Avoid using wall clock time, which can be changed by the user, or impacted by Daylight Savings transitions etc. BUG=14193 r=eroman Review URL: http://codereview.chromium.org/1253005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46821 0039d316-1c4b-4281-b951-d872f2087c98
* Provide a quick and dirty way to reset about:objects datajar@chromium.org2009-12-301-2/+1
| | | | | | | | | | | | | | | | | | | | | To make it easier to use the about:object profiling facility, I put in a quick/dirty way to reset all profile stats to 0 (as if there were no births, deaths, etc.). This code is only activated under debug builds (or if a developer inists in a private build). These stats don't impact semantics of the browser, so the hackish approach to clearing the data counts can't instigate a crash, and it makes it much easier to look at changes in the stats. While changing the code, I also added a lot of comments, and did a few minor cleanups items. I also officially added about:tasks as a replacement for about:objects, as this is really how the service is used in Chrome. r=mbelshe Review URL: http://codereview.chromium.org/100297 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35372 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-101-2/+0
| | | | | | | | | Normalize end of file newlines in base/. All files end in a single newline. Review URL: http://codereview.chromium.org/42011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11329 0039d316-1c4b-4281-b951-d872f2087c98
* Move Time, TimeDelta and TimeTicks into namespace base.dsh@google.com2008-10-271-0/+2
| | | | | | Review URL: http://codereview.chromium.org/7995 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4022 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* fix builddarin@google.com2008-08-041-1/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@324 0039d316-1c4b-4281-b951-d872f2087c98
* Revise the ObjectWatcher API to be one-to-one with the object being watched. ↵darin@google.com2008-08-041-0/+1
| | | | | | | | | | | | This greatly simplifies the implementation and API. Now consumers can use ObjectWatcher as a "smart pointer" class, which automatically cleans-up after itself when it goes out of scope. I also switched away from the Task based API to one that is more compatible with MessageLoop::WatchObject. That allows me to make minimal changes to existing code, and it also means that consumers do not have to allocate Task objects to use this API. In this CL, I included changes to make a couple consumers use ObjectWatcher instead of ML::WatchObject. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@322 0039d316-1c4b-4281-b951-d872f2087c98
* Include trivial definition of method in release mode (where we don't do ↵jar@google.com2008-08-011-0/+1
| | | | | | | | | | | | | tracking) Repair tree bustage TBR=darin M base/tracked.cc git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266 0039d316-1c4b-4281-b951-d872f2087c98
* A new (private) interface is supplied that allows the object watcher (coding injar@google.com2008-08-011-0/+4
| | | | | | | | | | | | | | | | | | | | | proress by Darin) to Post the task (when the object is signaled) into a message loop. I also cleaned up the time-of-birth for tasks that sleep for a while before running (such as those held by the timer, or by passed to this new PostSignaledTask() interface. r=darin M base/tracked.cc M base/message_loop.h M base/message_loop.cc M base/tracked.h git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262 0039d316-1c4b-4281-b951-d872f2087c98
* Add base to the repository.initial.commit2008-07-261-0/+113
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8 0039d316-1c4b-4281-b951-d872f2087c98