summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/stats_histogram.cc
Commit message (Collapse)AuthorAgeFilesLines
* Reland re-organization of net/disk_cache/gavinp@chromium.org2014-03-031-94/+0
| | | | | | | | | | | | Originally this landed from https://codereview.chromium.org/121643003/ , but reverted due to an iOS build break. BUG=331062 TBR=mmenke@chromium.org,rvargas@chromium.org Review URL: https://codereview.chromium.org/185003007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254474 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 253581 "Reorganize net/disk_cache into backend specific d..."gavinp@chromium.org2014-02-261-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | > Reorganize net/disk_cache into backend specific directories. > > We want to unlink the blockfile cache on Android, and it seems that > we'll want more platforms with more varieties of backend in the > future. So let's move the backend into its own subdirectory as we > start to untangle the dependencies from tests/etc... into their > respective backends. > > This initial checkin isn't perfect; in particular the tests have a lot > of v2 specific dependencies still. > > R=rvargas@chromium.org, cbentzel, rvargas > BUG=331062 > > Review URL: https://codereview.chromium.org/121643003 TBR=gavinp@chromium.org Review URL: https://codereview.chromium.org/181503005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253598 0039d316-1c4b-4281-b951-d872f2087c98
* Reorganize net/disk_cache into backend specific directories.gavinp@chromium.org2014-02-261-94/+0
| | | | | | | | | | | | | | | | | | We want to unlink the blockfile cache on Android, and it seems that we'll want more platforms with more varieties of backend in the future. So let's move the backend into its own subdirectory as we start to untangle the dependencies from tests/etc... into their respective backends. This initial checkin isn't perfect; in particular the tests have a lot of v2 specific dependencies still. R=rvargas@chromium.org, cbentzel, rvargas BUG=331062 Review URL: https://codereview.chromium.org/121643003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253581 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Make sure the size stats ate not used after the backend goes away.rvargas@chromium.org2013-09-031-1/+6
| | | | | | | | | | BUG=275799 TEST=none R=jar@chromium.org Review URL: https://chromiumcodereview.appspot.com/23658006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221001 0039d316-1c4b-4281-b951-d872f2087c98
* [UMA] Remove redundant bucket_count variable from base::Histogram.isherman@chromium.org2013-06-271-5/+3
| | | | | | | | | | BUG=248623 TEST=none R=jar@chromium.org Review URL: https://chromiumcodereview.appspot.com/17451016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208917 0039d316-1c4b-4281-b951-d872f2087c98
* Connect SparseHistogram with the rest of stats systemkaiwang@chromium.org2013-03-011-4/+4
| | | | | | | | | | | | | With this CL, SparseHistogram is usable with SparseHistogram::FactoryGet. Next step is to implement a Histogram like macro and implement WriteHTMLGraph and WriteAscii to have a nice output. BUG=139612 Review URL: https://chromiumcodereview.appspot.com/12207058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185451 0039d316-1c4b-4281-b951-d872f2087c98
* Histogram type support in HistogramBase and remove SetRangeDescription functionkaiwang@chromium.org2012-10-311-1/+1
| | | | | | | | | BUG=139612 Review URL: https://chromiumcodereview.appspot.com/11342060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165116 0039d316-1c4b-4281-b951-d872f2087c98
* Move SnapshotSamples to HistogramBasekaiwang@chromium.org2012-10-201-2/+2
| | | | | | | | | BUG=139612 Review URL: https://chromiumcodereview.appspot.com/11192077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163138 0039d316-1c4b-4281-b951-d872f2087c98
* SampleSet -> HistogramSamples which can be reused by SparseHistogramkaiwang@chromium.org2012-09-221-37/+42
| | | | | | | | BUG=139612 Review URL: https://chromiumcodereview.appspot.com/10829466 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158166 0039d316-1c4b-4281-b951-d872f2087c98
* This is a major refactor of Histogram related code:kaiwang@chromium.org2012-08-011-11/+1
| | | | | | | | | | | 1. Remove duplicated code from histogram.h/.cc, including validating related code and BucketRanges related. 2. Constness of BucketRanges from Histograms, to prevent accidentally modification and provide a simpler interface. 3. Add/move tests. Review URL: https://chromiumcodereview.appspot.com/10834011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149495 0039d316-1c4b-4281-b951-d872f2087c98
* Change the FindHistogram interface of StatisticsRecorderkaiwang@chromium.org2012-07-181-5/+2
| | | | | | Review URL: https://chromiumcodereview.appspot.com/10802002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147269 0039d316-1c4b-4281-b951-d872f2087c98
* Move StatisticsRecorder out of histogram.cc/h for further refactoring.kaiwang@chromium.org2012-07-131-1/+2
| | | | | | Review URL: https://chromiumcodereview.appspot.com/10703037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146659 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce the ANNOTATE_LEAKING_OBJECT_PTR annotation that can be used to markglider@chromium.org2011-05-311-2/+2
| | | | | | | | | | | | heap allocated objects as intentionally leaked ones. Annotate the histograms produced by {Histogram,BooleanHistogram,LinearHistogram,CustomHistogram}::FactoryGet(), as leaked. Rename StatsHistogram::StatsHistogramFactoryGet to StatsHistogram::FactoryGet, annotate the result as leaky, update the suppressions. BUG=79322 Review URL: http://codereview.chromium.org/7071036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87278 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 86990 - Fix http://codereview.chromium.org/6869009 to ignore an ↵msw@chromium.org2011-05-271-4/+2
| | | | | | | | | | | | | | | | | | | existing object exactly once and land the CL again: Introduce the ANNOTATE_LEAKING_OBJECT_PTR annotation that can be used to mark heap allocated objects as intentionally leaked ones. Annotate the histograms produced by {Histogram,BooleanHistogram,LinearHistogram,CustomHistogram}::FactoryGet(), as leaked. Rename StatsHistogram::StatsHistogramFactoryGet to StatsHistogram::FactoryGet, annotate the result as leaky, update the suppressions. BUG=79322 TBR=jar Review URL: http://codereview.chromium.org/6976044 TBR=glider@chromium.org Review URL: http://codereview.chromium.org/7071035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86993 0039d316-1c4b-4281-b951-d872f2087c98
* Fix http://codereview.chromium.org/6869009 to ignore an existing object ↵glider@chromium.org2011-05-271-2/+4
| | | | | | | | | | | | | | | | exactly once and land the CL again: Introduce the ANNOTATE_LEAKING_OBJECT_PTR annotation that can be used to mark heap allocated objects as intentionally leaked ones. Annotate the histograms produced by {Histogram,BooleanHistogram,LinearHistogram,CustomHistogram}::FactoryGet(), as leaked. Rename StatsHistogram::StatsHistogramFactoryGet to StatsHistogram::FactoryGet, annotate the result as leaky, update the suppressions. BUG=79322 TBR=jar Review URL: http://codereview.chromium.org/6976044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86990 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Land http://codereview.chromium.org/6869009 for the third time."oshima@google.com2011-05-261-3/+2
| | | | | | | | | | | | | | | | | | | | | | This reverts commit d4ff483fbf60aad0b49fddd1937774edb3ba1d7e. --- Introduce the ANNOTATE_LEAKING_OBJECT_PTR annotation that can be used to mark heap allocated objects as intentionally leaked ones. Annotate the histograms produced by {Histogram,BooleanHistogram,LinearHistogram,CustomHistogram}::FactoryGet(), as leaked. Rename StatsHistogram::StatsHistogramFactoryGet to StatsHistogram::FactoryGet, annotate the result as leaky, update the suppressions. --- TBR=glider@chromium.org TEST=HistogramTest.RecordedStartupTest and WebSocketTest.ServerSentData in heapchecker bot wont hang. BUG=79322 Review URL: http://codereview.chromium.org/6962016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86853 0039d316-1c4b-4281-b951-d872f2087c98
* Land http://codereview.chromium.org/6869009 for the third time.glider@chromium.org2011-05-261-2/+3
| | | | | | | | | | | | | | Introduce the ANNOTATE_LEAKING_OBJECT_PTR annotation that can be used to mark heap allocated objects as intentionally leaked ones. Annotate the histograms produced by {Histogram,BooleanHistogram,LinearHistogram,CustomHistogram}::FactoryGet(), as leaked. Rename StatsHistogram::StatsHistogramFactoryGet to StatsHistogram::FactoryGet, annotate the result as leaky, update the suppressions. BUG=79322 TBR=jar,willchan Review URL: http://codereview.chromium.org/7062016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86794 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 85898 - Re-land http://codereview.chromium.org/6869009 (except for ↵glider@chromium.org2011-05-191-3/+2
| | | | | | | | | | | | | | | | | | | | | the suppressions) Introduce the ANNOTATE_LEAKING_OBJECT_PTR annotation that can be used to mark heap allocated objects as intentionally leaked ones. Annotate the histograms produced by {Histogram,BooleanHistogram,LinearHistogram,CustomHistogram}::FactoryGet(), as leaked. Rename StatsHistogram::StatsHistogramFactoryGet to StatsHistogram::FactoryGet, annotate the result as leaky. The previous commit broke the build on Linux Heapcheck, but looks like the problem has gone now. TBR=jar,willchan BUG=79322 Review URL: http://codereview.chromium.org/7048005 TBR=glider@chromium.org Review URL: http://codereview.chromium.org/7049006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85905 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land http://codereview.chromium.org/6869009 (except for the suppressions)glider@chromium.org2011-05-191-2/+3
| | | | | | | | | | | | | | | | Introduce the ANNOTATE_LEAKING_OBJECT_PTR annotation that can be used to mark heap allocated objects as intentionally leaked ones. Annotate the histograms produced by {Histogram,BooleanHistogram,LinearHistogram,CustomHistogram}::FactoryGet(), as leaked. Rename StatsHistogram::StatsHistogramFactoryGet to StatsHistogram::FactoryGet, annotate the result as leaky. The previous commit broke the build on Linux Heapcheck, but looks like the problem has gone now. TBR=jar,willchan BUG=79322 Review URL: http://codereview.chromium.org/7048005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85898 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 82460 - Introduce the ANNOTATE_LEAKING_OBJECT_PTR annotation that can ↵glider@chromium.org2011-04-211-3/+2
| | | | | | | | | be used to markheap allocated objects as intentionally leaked ones.Annotate the histograms produced by {Histogram,BooleanHistogram,LinearHistogram,CustomHistogram}::FactoryGet(), as leaked.Rename StatsHistogram::StatsHistogramFactoryGet to StatsHistogram::FactoryGet, annotate the result as leaky, update the suppressions.BUG=79322Review URL: http://codereview.chromium.org/6869009 TBR=cbentzel Review URL: http://codereview.chromium.org/6873152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82483 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce the ANNOTATE_LEAKING_OBJECT_PTR annotation that can be used to markglider@chromium.org2011-04-211-2/+3
| | | | | | | | | | | | heap allocated objects as intentionally leaked ones. Annotate the histograms produced by {Histogram,BooleanHistogram,LinearHistogram,CustomHistogram}::FactoryGet(), as leaked. Rename StatsHistogram::StatsHistogramFactoryGet to StatsHistogram::FactoryGet, annotate the result as leaky, update the suppressions. BUG=79322 Review URL: http://codereview.chromium.org/6869009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82460 0039d316-1c4b-4281-b951-d872f2087c98
* Use lock-free lazy initialization for static histogram referencesjar@chromium.org2011-04-051-14/+11
| | | | | | | | | | | | | | | | Make all histogram macros thread safe, and fast by again using statics to achieve performance. ...at the cost of: Leak all histograms to avoid races at shutdown. Also included leak suppression for valgrind. r=rtenneti BUG=78207 Review URL: http://codereview.chromium.org/6780035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80412 0039d316-1c4b-4281-b951-d872f2087c98
* Move flags initialization into block before sharing across threadsjar@chromium.org2011-03-301-3/+2
| | | | | | | | | | | | | | | | | | | | | | | We re-initialized the flags after we shared the histograms, so there was a potential race for multiple simultaneous initializations. This change completes the basic setting of the flags prior to registration, which in turn shares the histogram across threads. There was a potential race with the (later) setting of the flag during an upload from the renderer. With the new code, the flag is const except for its potential change by the renderer-serialization routine, which is also the only consumer of this flag (in the renderer). I also made the corresponding change to stats_histogram, even though the code was already at least as correct, as I wanted the patterns of use to remain analagous. r=rvargas,rtenneti BUG=77760 Review URL: http://codereview.chromium.org/6731074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79835 0039d316-1c4b-4281-b951-d872f2087c98
* Reland code to detect corruption of histogram rangesjar@chromium.org2011-03-051-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | This code was reverted because it caused, or exposed flakiness in sync unit test code (mostly on the Mac). We need to monitor that closely as we re-land. See the reviews and history in CLs: http://codereview.chromium.org/6577013 and http://codereview.chromium.org/6591052 This code generates CRC checksums for the histogram bucket-range vectors, and guarantees they remain intact when the histogram data is about to be uploaded to UMA. If the data is corrupted, then we will fail on a CHECK(). r=mbelshe,rvargas bug=73939 Review URL: http://codereview.chromium.org/6627011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77033 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 76239 - Crash when we notice a corruption of the histogram range-vectorrsimha@chromium.org2011-03-031-13/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reason for revert: This patch might have resulted in some flakiness in the sync bots on the chromium waterfall. The range vector is calculated once when a histogram is constructed, and should never change over the lifetime of the histogram. When it does change, it means that memory is being overwritten. We now crash (via CHECK) when there is any detected corruption of the range vector. This CL uses a more robust check-sum algorithm to detect corruption of the vector. The previous algorithm just did a sum, and was too easilly tricked by small (offsetting) changes in several ranges. Hopefully, this CRC-32 implementation will not be so easilly fooled. I had to refactor the class to ensure that each histogram was completely constructed before I registered it. The old code could sometimes register a base class (tradtional Histogram, with exponential bucket spread) and then run the derived constructor (such as when creating a LinearHistogram, with a second construction of the ranges and checksum). I now carefully avoid generating the checksum until fully constructing the instance, and then I run InitializeBuckets only once on the instance before registering it. bug=73939,74467 r=mbelshe Review URL: http://codereview.chromium.org/6577013 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/6611001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76667 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 76345 - Small cleanup for previous histogram checkinrsimha@chromium.org2011-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | Reason for revert: This patch might have resulted in some flakiness in the sync bots on the chromium waterfall. CL http://codereview.chromium.org/6577013/ had a few changes suggested that were not incorporated. This CL has those name changes etc. r=rvargas Review URL: http://codereview.chromium.org/6591052 BUG=74467 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/6591129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76662 0039d316-1c4b-4281-b951-d872f2087c98
* Small cleanup for previous histogram checkinjar@chromium.org2011-03-011-1/+1
| | | | | | | | | | | | | | CL http://codereview.chromium.org/6577013/ had a few changes suggested that were not incorporated. This CL has those name changes etc. r=rvargas Review URL: http://codereview.chromium.org/6591052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76345 0039d316-1c4b-4281-b951-d872f2087c98
* Crash when we notice a corruption of the histogram range-vectorjar@chromium.org2011-02-281-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The range vector is calculated once when a histogram is constructed, and should never change over the lifetime of the histogram. When it does change, it means that memory is being overwritten. We now crash (via CHECK) when there is any detected corruption of the range vector. This CL uses a more robust check-sum algorithm to detect corruption of the vector. The previous algorithm just did a sum, and was too easilly tricked by small (offsetting) changes in several ranges. Hopefully, this CRC-32 implementation will not be so easilly fooled. I had to refactor the class to ensure that each histogram was completely constructed before I registered it. The old code could sometimes register a base class (tradtional Histogram, with exponential bucket spread) and then run the derived constructor (such as when creating a LinearHistogram, with a second construction of the ranges and checksum). I now carefully avoid generating the checksum until fully constructing the instance, and then I run InitializeBuckets only once on the instance before registering it. bug=73939 r=mbelshe Review URL: http://codereview.chromium.org/6577013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76239 0039d316-1c4b-4281-b951-d872f2087c98
* More net/ header/implementation method reordering.erg@google.com2011-01-211-6/+6
| | | | | | | | | | | (Contains some minor de-inlining.) BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6263010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72232 0039d316-1c4b-4281-b951-d872f2087c98
* Allow histograms in cache stats.cc to bypass corruption checksjar@chromium.org2010-11-031-0/+6
| | | | | | | | | | | | | | | | This is a relanding of http://codereview.chromium.org/4174002 The change in this CL is that I've made the function to look for errors virtual, and over-rode it in StatsHistograms. The current override doesn't actually check for inconsistencies, so that the UMA checks (and renderer-to-histogram checks) won't complain and refuse to transport the histograms. BUG=61281 r=rvargas Review URL: http://codereview.chromium.org/4364001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64990 0039d316-1c4b-4281-b951-d872f2087c98
* Convert implicit scoped_refptr constructor calls to explicit ones, part 1thakis@chromium.org2010-11-011-1/+1
| | | | | | | | | | | This CL was created automatically by this clang rewriter: http://codereview.appspot.com/2776043/ . I manually fixed a few rough spots of the rewriter output (doh1-3) and fixed all presubmit errors. BUG=28083 TEST=None Review URL: http://codereview.chromium.org/4192012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64573 0039d316-1c4b-4281-b951-d872f2087c98
* Move Stats, histograms, and field trial into a metrics subdirectory of base andbrettw@chromium.org2010-10-141-0/+3
| | | | | | | | | put them in the base namespace. TEST=it compiles BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62510 0039d316-1c4b-4281-b951-d872f2087c98
* Use factory to create histograms, and refcounts to track lifetimesjar@chromium.org2009-12-061-0/+31
| | | | | | | | | | | | | | | This is CL patch 377028 by Raman Tenneti, with minor changes to make the try-bots happier. It is cleanup that better ensures lifetimes of histograms (making it harder for users to abuse them). bug=16495 (repairs leak induced by the first landing) bug=18840 (should make leaks less possible) tbr=raman.tenneti Review URL: http://codereview.chromium.org/462027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33933 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-111-1/+0
| | | | | | | | | Normalize end of file newlines in net/. All files end in a single newline. Review URL: http://codereview.chromium.org/43079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11442 0039d316-1c4b-4281-b951-d872f2087c98
* Use histograms to send interesting parts of the disk cache statistics.rvargas@google.com2008-09-241-0/+56
Most of this CL deals with a derived implementation of histograms that just queries the size stats already generated by the disk cache. The exact number of buckets, and their distribution, is controlled directly by the new class and the disk cache stats code. Review URL: http://codereview.chromium.org/3069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2580 0039d316-1c4b-4281-b951-d872f2087c98