Index: base/metrics/histogram_persistence.h |
diff --git a/base/metrics/histogram_persistence.h b/base/metrics/histogram_persistence.h |
index 95f48784c9859a3a0003092ca37f258ee047a1b9..0bd8033f53c9b1f4bc55118fb1eec9915bace90f 100644 |
--- a/base/metrics/histogram_persistence.h |
+++ b/base/metrics/histogram_persistence.h |
@@ -8,11 +8,15 @@ |
#include "base/base_export.h" |
#include "base/feature_list.h" |
#include "base/memory/scoped_ptr.h" |
+#include "base/memory/shared_memory.h" |
#include "base/metrics/histogram_base.h" |
#include "base/metrics/persistent_memory_allocator.h" |
+#include "base/strings/string_piece.h" |
namespace base { |
+class SharedPersistentMemoryAllocator; |
+ |
// Feature definition for enabling histogram persistence. |
BASE_EXPORT extern const Feature kPersistentHistogramsFeature; |
@@ -39,6 +43,21 @@ BASE_EXPORT PersistentMemoryAllocator* GetPersistentHistogramMemoryAllocator(); |
BASE_EXPORT PersistentMemoryAllocator* |
ReleasePersistentHistogramMemoryAllocatorForTesting(); |
+// Create a sharable memory segment with an attached persistent memory |
+// allocator suitable for storing histograms. This segment can be shared |
+// with other processes via an IPC message and used to create the same |
+// on the other side. |
Alexei Svitkine (slow)
2016/03/24 17:29:53
Please document the params better. What's id? What
|
+BASE_EXPORT SharedPersistentMemoryAllocator* |
+CreateSharedPersistentHistogramMemoryAllocator( |
+ size_t size, |
+ StringPiece name, |
+ uint64_t id); |
+BASE_EXPORT SharedPersistentMemoryAllocator* |
+CreateSharedPersistentHistogramMemoryAllocator( |
Alexei Svitkine (slow)
2016/03/24 17:29:52
Overloads are generally discouraged. Please use di
|
+ size_t size, |
+ const SharedMemoryHandle& handle, |
+ bool readonly); |
+ |
// Recreate a Histogram from data held in persistent memory. Though this |
// object will be local to the current process, the sample data will be |
// shared with all other threads referencing it. This method takes a |ref| |