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

Side by Side Diff: src/runtime-profiler.h

Issue 7617003: Remove unused code from runtime profiler. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Stops the runtime profiler thread when profiling support is being 87 // Stops the runtime profiler thread when profiling support is being
88 // turned off. 88 // turned off.
89 static void StopRuntimeProfilerThreadBeforeShutdown(Thread* thread); 89 static void StopRuntimeProfilerThreadBeforeShutdown(Thread* thread);
90 90
91 void UpdateSamplesAfterScavenge(); 91 void UpdateSamplesAfterScavenge();
92 void RemoveDeadSamples(); 92 void RemoveDeadSamples();
93 void UpdateSamplesAfterCompact(ObjectVisitor* visitor); 93 void UpdateSamplesAfterCompact(ObjectVisitor* visitor);
94 94
95 private: 95 private:
96 static const int kSamplerWindowSize = 16; 96 static const int kSamplerWindowSize = 16;
97 static const int kStateWindowSize = 128;
98
99 enum SamplerState {
100 IN_NON_JS_STATE = 0,
101 IN_JS_STATE = 1
102 };
103 97
104 static void HandleWakeUp(Isolate* isolate); 98 static void HandleWakeUp(Isolate* isolate);
105 99
106 void Optimize(JSFunction* function); 100 void Optimize(JSFunction* function);
107 101
108 void AttemptOnStackReplacement(JSFunction* function); 102 void AttemptOnStackReplacement(JSFunction* function);
109 103
110 void ClearSampleBuffer(); 104 void ClearSampleBuffer();
111 105
112 void ClearSampleBufferNewSpaceEntries(); 106 void ClearSampleBufferNewSpaceEntries();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 166
173 void RuntimeProfiler::IsolateExitedJS(Isolate* isolate) { 167 void RuntimeProfiler::IsolateExitedJS(Isolate* isolate) {
174 Atomic32 new_state = NoBarrier_AtomicIncrement(&state_, -1); 168 Atomic32 new_state = NoBarrier_AtomicIncrement(&state_, -1);
175 ASSERT(new_state >= 0); 169 ASSERT(new_state >= 0);
176 USE(new_state); 170 USE(new_state);
177 } 171 }
178 172
179 } } // namespace v8::internal 173 } } // namespace v8::internal
180 174
181 #endif // V8_RUNTIME_PROFILER_H_ 175 #endif // V8_RUNTIME_PROFILER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698