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

Unified Diff: src/profile-generator.h

Issue 945873002: CpuProfiler: move StringsStorage class to separate source and header files. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | « src/heap-snapshot-generator.h ('k') | src/profile-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profile-generator.h
diff --git a/src/profile-generator.h b/src/profile-generator.h
index 9b4de6fe1a2a1ebbc8b4651ebae455bde4320e43..08e4afd6ca49bda73c5e7529f3e92aa8114db69d 100644
--- a/src/profile-generator.h
+++ b/src/profile-generator.h
@@ -9,42 +9,13 @@
#include "include/v8-profiler.h"
#include "src/allocation.h"
#include "src/hashmap.h"
+#include "src/strings-storage.h"
namespace v8 {
namespace internal {
struct OffsetRange;
-// Provides a storage of strings allocated in C++ heap, to hold them
-// forever, even if they disappear from JS heap or external storage.
-class StringsStorage {
- public:
- explicit StringsStorage(Heap* heap);
- ~StringsStorage();
-
- const char* GetCopy(const char* src);
- const char* GetFormatted(const char* format, ...);
- const char* GetVFormatted(const char* format, va_list args);
- const char* GetName(Name* name);
- const char* GetName(int index);
- const char* GetFunctionName(Name* name);
- const char* GetFunctionName(const char* name);
- size_t GetUsedMemorySize() const;
-
- private:
- static const int kMaxNameSize = 1024;
-
- static bool StringsMatch(void* key1, void* key2);
- const char* AddOrDisposeString(char* str, int len);
- HashMap::Entry* GetEntry(const char* str, int len);
-
- uint32_t hash_seed_;
- HashMap names_;
-
- DISALLOW_COPY_AND_ASSIGN(StringsStorage);
-};
-
-
// Provides a mapping from the offsets within generated code to
// the source line.
class JITLineInfoTable : public Malloced {
« no previous file with comments | « src/heap-snapshot-generator.h ('k') | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698