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

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

Issue 9431030: Support OSR in for-in loops. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Extend OptimizeFunctionOnNextCall with an arguments to force OSR. Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 static bool WaitForSomeIsolateToEnterJS(); 94 static bool WaitForSomeIsolateToEnterJS();
95 95
96 // Stops the runtime profiler thread when profiling support is being 96 // Stops the runtime profiler thread when profiling support is being
97 // turned off. 97 // turned off.
98 static void StopRuntimeProfilerThreadBeforeShutdown(Thread* thread); 98 static void StopRuntimeProfilerThreadBeforeShutdown(Thread* thread);
99 99
100 void UpdateSamplesAfterScavenge(); 100 void UpdateSamplesAfterScavenge();
101 void RemoveDeadSamples(); 101 void RemoveDeadSamples();
102 void UpdateSamplesAfterCompact(ObjectVisitor* visitor); 102 void UpdateSamplesAfterCompact(ObjectVisitor* visitor);
103 103
104 void AttemptOnStackReplacement(JSFunction* function);
105
104 private: 106 private:
105 static const int kSamplerWindowSize = 16; 107 static const int kSamplerWindowSize = 16;
106 108
107 static void HandleWakeUp(Isolate* isolate); 109 static void HandleWakeUp(Isolate* isolate);
108 110
109 void Optimize(JSFunction* function, const char* reason); 111 void Optimize(JSFunction* function, const char* reason);
110 112
111 void AttemptOnStackReplacement(JSFunction* function);
112
113 void ClearSampleBuffer(); 113 void ClearSampleBuffer();
114 114
115 void ClearSampleBufferNewSpaceEntries(); 115 void ClearSampleBufferNewSpaceEntries();
116 116
117 int LookupSample(JSFunction* function); 117 int LookupSample(JSFunction* function);
118 118
119 void AddSample(JSFunction* function, int weight); 119 void AddSample(JSFunction* function, int weight);
120 120
121 Isolate* isolate_; 121 Isolate* isolate_;
122 122
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 void RuntimeProfiler::IsolateExitedJS(Isolate* isolate) { 180 void RuntimeProfiler::IsolateExitedJS(Isolate* isolate) {
181 Atomic32 new_state = NoBarrier_AtomicIncrement(&state_, -1); 181 Atomic32 new_state = NoBarrier_AtomicIncrement(&state_, -1);
182 ASSERT(new_state >= 0); 182 ASSERT(new_state >= 0);
183 USE(new_state); 183 USE(new_state);
184 } 184 }
185 185
186 } } // namespace v8::internal 186 } } // namespace v8::internal
187 187
188 #endif // V8_RUNTIME_PROFILER_H_ 188 #endif // V8_RUNTIME_PROFILER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698