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

Side by Side Diff: src/profile-generator.h

Issue 1084009: Add a few tests to ProfilerEventsProcessor. (Closed)
Patch Set: Created 10 years, 9 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 unified diff | Download patch
« no previous file with comments | « src/cpu-profiler.h ('k') | src/profile-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 class ProfileNode { 58 class ProfileNode {
59 public: 59 public:
60 INLINE(explicit ProfileNode(CodeEntry* entry)); 60 INLINE(explicit ProfileNode(CodeEntry* entry));
61 61
62 ProfileNode* FindChild(CodeEntry* entry); 62 ProfileNode* FindChild(CodeEntry* entry);
63 ProfileNode* FindOrAddChild(CodeEntry* entry); 63 ProfileNode* FindOrAddChild(CodeEntry* entry);
64 INLINE(void IncrementSelfTicks()) { ++self_ticks_; } 64 INLINE(void IncrementSelfTicks()) { ++self_ticks_; }
65 INLINE(void IncreaseTotalTicks(unsigned amount)) { total_ticks_ += amount; } 65 INLINE(void IncreaseTotalTicks(unsigned amount)) { total_ticks_ += amount; }
66 66
67 INLINE(CodeEntry* entry()) { return entry_; } 67 INLINE(CodeEntry* entry() const) { return entry_; }
68 INLINE(unsigned total_ticks()) { return total_ticks_; } 68 INLINE(unsigned total_ticks() const) { return total_ticks_; }
69 INLINE(unsigned self_ticks()) { return self_ticks_; } 69 INLINE(unsigned self_ticks() const) { return self_ticks_; }
70 void GetChildren(List<ProfileNode*>* children);
70 71
71 void Print(int indent); 72 void Print(int indent);
72 73
73 private: 74 private:
74 INLINE(static bool CodeEntriesMatch(void* entry1, void* entry2)) { 75 INLINE(static bool CodeEntriesMatch(void* entry1, void* entry2)) {
75 return entry1 == entry2; 76 return entry1 == entry2;
76 } 77 }
77 78
78 INLINE(static uint32_t CodeEntryHash(CodeEntry* entry)) { 79 INLINE(static uint32_t CodeEntryHash(CodeEntry* entry)) {
79 return static_cast<int32_t>(reinterpret_cast<intptr_t>(entry)); 80 return static_cast<int32_t>(reinterpret_cast<intptr_t>(entry));
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 CpuProfilesCollection* profiles_; 238 CpuProfilesCollection* profiles_;
238 CodeMap code_map_; 239 CodeMap code_map_;
239 240
240 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); 241 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator);
241 }; 242 };
242 243
243 244
244 } } // namespace v8::internal 245 } } // namespace v8::internal
245 246
246 #endif // V8_PROFILE_GENERATOR_H_ 247 #endif // V8_PROFILE_GENERATOR_H_
OLDNEW
« no previous file with comments | « src/cpu-profiler.h ('k') | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698