OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_PROFILER_STRINGS_STORAGE_H_ | 5 #ifndef V8_PROFILER_STRINGS_STORAGE_H_ |
6 #define V8_PROFILER_STRINGS_STORAGE_H_ | 6 #define V8_PROFILER_STRINGS_STORAGE_H_ |
7 | 7 |
8 #include <stdarg.h> | 8 #include <stdarg.h> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 const char* GetName(int index); | 29 const char* GetName(int index); |
30 const char* GetFunctionName(Name* name); | 30 const char* GetFunctionName(Name* name); |
31 const char* GetFunctionName(const char* name); | 31 const char* GetFunctionName(const char* name); |
32 size_t GetUsedMemorySize() const; | 32 size_t GetUsedMemorySize() const; |
33 | 33 |
34 private: | 34 private: |
35 static const int kMaxNameSize = 1024; | 35 static const int kMaxNameSize = 1024; |
36 | 36 |
37 static bool StringsMatch(void* key1, void* key2); | 37 static bool StringsMatch(void* key1, void* key2); |
38 const char* AddOrDisposeString(char* str, int len); | 38 const char* AddOrDisposeString(char* str, int len); |
39 base::HashMap::Entry* GetEntry(const char* str, int len); | 39 base::CustomMatcherHashMap::Entry* GetEntry(const char* str, int len); |
40 | 40 |
41 uint32_t hash_seed_; | 41 uint32_t hash_seed_; |
42 base::HashMap names_; | 42 base::CustomMatcherHashMap names_; |
43 | 43 |
44 DISALLOW_COPY_AND_ASSIGN(StringsStorage); | 44 DISALLOW_COPY_AND_ASSIGN(StringsStorage); |
45 }; | 45 }; |
46 } // namespace internal | 46 } // namespace internal |
47 } // namespace v8 | 47 } // namespace v8 |
48 | 48 |
49 #endif // V8_PROFILER_STRINGS_STORAGE_H_ | 49 #endif // V8_PROFILER_STRINGS_STORAGE_H_ |
OLD | NEW |