V8 Project
runtime-profiler.h
Go to the documentation of this file.
1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef V8_RUNTIME_PROFILER_H_
6 #define V8_RUNTIME_PROFILER_H_
7 
8 #include "src/allocation.h"
9 
10 namespace v8 {
11 
12 namespace base {
13 class Semaphore;
14 }
15 
16 namespace internal {
17 
18 class Isolate;
19 class JSFunction;
20 class Object;
21 
23  public:
24  explicit RuntimeProfiler(Isolate* isolate);
25 
26  void OptimizeNow();
27 
28  void NotifyICChanged() { any_ic_changed_ = true; }
29 
30  void AttemptOnStackReplacement(JSFunction* function, int nesting_levels = 1);
31 
32  private:
33  void Optimize(JSFunction* function, const char* reason);
34 
35  bool CodeSizeOKForOSR(Code* shared_code);
36 
38 
40 };
41 
42 } } // namespace v8::internal
43 
44 #endif // V8_RUNTIME_PROFILER_H_
bool CodeSizeOKForOSR(Code *shared_code)
void Optimize(JSFunction *function, const char *reason)
void AttemptOnStackReplacement(JSFunction *function, int nesting_levels=1)
kSerializedDataOffset Object
Definition: objects-inl.h:5322
Debugger support for the V8 JavaScript engine.
Definition: accessors.cc:20