OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SQL_PROCESS_MEMORY_DUMP_PROVIDER_H |
| 6 #define SQL_PROCESS_MEMORY_DUMP_PROVIDER_H |
| 7 |
| 8 #include "base/memory/singleton.h" |
| 9 #include "base/trace_event/memory_dump_provider.h" |
| 10 #include "sql/sql_export.h" |
| 11 |
| 12 namespace sql { |
| 13 |
| 14 // Adds process-wide memory usage statistics about sqlite to chrome://tracing. |
| 15 // sql::Connection::OnMemoryDump adds per-connection memory statistics. |
| 16 class SQL_EXPORT SqlMemoryDumpProvider |
| 17 : public base::trace_event::MemoryDumpProvider { |
| 18 public: |
| 19 static SqlMemoryDumpProvider* GetInstance(); |
| 20 |
| 21 // MemoryDumpProvider implementation. |
| 22 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, |
| 23 base::trace_event::ProcessMemoryDump* pmd) override; |
| 24 |
| 25 private: |
| 26 friend struct base::DefaultSingletonTraits<SqlMemoryDumpProvider>; |
| 27 |
| 28 SqlMemoryDumpProvider(); |
| 29 ~SqlMemoryDumpProvider() override; |
| 30 |
| 31 DISALLOW_COPY_AND_ASSIGN(SqlMemoryDumpProvider); |
| 32 }; |
| 33 |
| 34 } // namespace sql |
| 35 |
| 36 #endif // SQL_PROCESS_MEMORY_DUMP_PROVIDER_H |
OLD | NEW |