| Index: base/metrics/histogram.h
|
| diff --git a/base/metrics/histogram.h b/base/metrics/histogram.h
|
| index 8840493af098437104ed0ba8693e72e860360ab9..75b70353d8ff0cb9e95f6ecd8084f7ef28e0d998 100644
|
| --- a/base/metrics/histogram.h
|
| +++ b/base/metrics/histogram.h
|
| @@ -197,6 +197,20 @@ class BASE_EXPORT Histogram : public HistogramBase {
|
| Sample maximum,
|
| const BucketRanges* ranges);
|
|
|
| + // Traditionally, histograms allocate their own memory for the bucket
|
| + // vector but "shared" histograms use memory regions allocated from a
|
| + // special memory segment that is passed in here. It is assumed that
|
| + // the life of this memory is managed externally and exceeds the lifetime
|
| + // of this object. Practically, this memory is never released until the
|
| + // process exits and the OS cleans it up.
|
| + Histogram(const std::string& name,
|
| + Sample minimum,
|
| + Sample maximum,
|
| + const BucketRanges* ranges,
|
| + HistogramBase::AtomicCount* counts,
|
| + size_t counts_size,
|
| + HistogramSamples::Metadata* meta);
|
| +
|
| ~Histogram() override;
|
|
|
| // HistogramBase implementation:
|
| @@ -225,6 +239,9 @@ class BASE_EXPORT Histogram : public HistogramBase {
|
| friend class StatisticsRecorder; // To allow it to delete duplicates.
|
| friend class StatisticsRecorderTest;
|
|
|
| + friend BASE_EXPORT HistogramBase* HistogramBase::CreatePersistentHistogram(
|
| + PersistentMemoryAllocator* allocator,
|
| + PersistentHistogramData* histogram_data);
|
| friend BASE_EXPORT HistogramBase* DeserializeHistogramInfo(
|
| base::PickleIterator* iter);
|
| static HistogramBase* DeserializeInfoImpl(base::PickleIterator* iter);
|
| @@ -339,6 +356,14 @@ class BASE_EXPORT LinearHistogram : public Histogram {
|
| Sample maximum,
|
| const BucketRanges* ranges);
|
|
|
| + LinearHistogram(const std::string& name,
|
| + Sample minimum,
|
| + Sample maximum,
|
| + const BucketRanges* ranges,
|
| + HistogramBase::AtomicCount* counts,
|
| + size_t counts_size,
|
| + HistogramSamples::Metadata* meta);
|
| +
|
| double GetBucketSize(Count current, size_t i) const override;
|
|
|
| // If we have a description for a bucket, then return that. Otherwise
|
| @@ -350,6 +375,9 @@ class BASE_EXPORT LinearHistogram : public Histogram {
|
| bool PrintEmptyBucket(size_t index) const override;
|
|
|
| private:
|
| + friend BASE_EXPORT HistogramBase* HistogramBase::CreatePersistentHistogram(
|
| + PersistentMemoryAllocator* allocator,
|
| + PersistentHistogramData* histogram_data);
|
| friend BASE_EXPORT HistogramBase* DeserializeHistogramInfo(
|
| base::PickleIterator* iter);
|
| static HistogramBase* DeserializeInfoImpl(base::PickleIterator* iter);
|
| @@ -379,7 +407,14 @@ class BASE_EXPORT BooleanHistogram : public LinearHistogram {
|
|
|
| private:
|
| BooleanHistogram(const std::string& name, const BucketRanges* ranges);
|
| -
|
| + BooleanHistogram(const std::string& name,
|
| + const BucketRanges* ranges,
|
| + HistogramBase::AtomicCount* counts,
|
| + HistogramSamples::Metadata* meta);
|
| +
|
| + friend BASE_EXPORT HistogramBase* HistogramBase::CreatePersistentHistogram(
|
| + PersistentMemoryAllocator* allocator,
|
| + PersistentHistogramData* histogram_data);
|
| friend BASE_EXPORT HistogramBase* DeserializeHistogramInfo(
|
| base::PickleIterator* iter);
|
| static HistogramBase* DeserializeInfoImpl(base::PickleIterator* iter);
|
| @@ -422,12 +457,21 @@ class BASE_EXPORT CustomHistogram : public Histogram {
|
| CustomHistogram(const std::string& name,
|
| const BucketRanges* ranges);
|
|
|
| + CustomHistogram(const std::string& name,
|
| + const BucketRanges* ranges,
|
| + HistogramBase::AtomicCount* counts,
|
| + size_t counts_size,
|
| + HistogramSamples::Metadata* meta);
|
| +
|
| // HistogramBase implementation:
|
| bool SerializeInfoImpl(base::Pickle* pickle) const override;
|
|
|
| double GetBucketSize(Count current, size_t i) const override;
|
|
|
| private:
|
| + friend BASE_EXPORT HistogramBase* HistogramBase::CreatePersistentHistogram(
|
| + PersistentMemoryAllocator* allocator,
|
| + PersistentHistogramData* histogram_data);
|
| friend BASE_EXPORT HistogramBase* DeserializeHistogramInfo(
|
| base::PickleIterator* iter);
|
| static HistogramBase* DeserializeInfoImpl(base::PickleIterator* iter);
|
|
|