Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: base/metrics/stats_table.h

Issue 22911027: Pass StatsTable shared memory via global descriptors on Posix rather than using named shared memory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add empty line Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/metrics/stats_table.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/stats_table.h
diff --git a/base/metrics/stats_table.h b/base/metrics/stats_table.h
index 153af38c928c3379ecdedd4333883c3252c94547..49ba79f88ba71a3692b3310ef3f6fa7bff8fc857 100644
--- a/base/metrics/stats_table.h
+++ b/base/metrics/stats_table.h
@@ -25,6 +25,7 @@
#include "base/base_export.h"
#include "base/basictypes.h"
#include "base/containers/hash_tables.h"
+#include "base/memory/shared_memory.h"
#include "base/synchronization/lock.h"
#include "base/threading/thread_local_storage.h"
@@ -116,6 +117,11 @@ class BASE_EXPORT StatsTable {
// The maxinum number of threads/columns in the table.
int GetMaxThreads() const;
+#if defined(OS_POSIX)
+ // Get the underlying shared memory handle for the table.
+ base::SharedMemoryHandle GetSharedMemoryHandle() const;
+#endif
+
// The maximum length (in characters) of a Thread's name including
// null terminator, as stored in the shared memory.
static const int kMaxThreadNameLength = 32;
@@ -130,7 +136,7 @@ class BASE_EXPORT StatsTable {
static int* FindLocation(const char *name);
private:
- class Private;
+ class Internal;
struct TLSData;
typedef hash_map<std::string, int> CountersMap;
@@ -172,7 +178,7 @@ class BASE_EXPORT StatsTable {
// initialized.
TLSData* GetTLSData() const;
- Private* impl_;
+ Internal* internal_;
// The counters_lock_ protects the counters_ hash table.
base::Lock counters_lock_;
« no previous file with comments | « no previous file | base/metrics/stats_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698