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

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

Issue 6594073: Enable optimizing JSFunctions that are in new-space.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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 | Annotate | Revision Log
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 29 matching lines...) Expand all
40 40
41 static void OptimizeNow(); 41 static void OptimizeNow();
42 static void OptimizeSoon(JSFunction* function); 42 static void OptimizeSoon(JSFunction* function);
43 43
44 static void NotifyTick(); 44 static void NotifyTick();
45 45
46 static void Setup(); 46 static void Setup();
47 static void Reset(); 47 static void Reset();
48 static void TearDown(); 48 static void TearDown();
49 49
50 static void MarkCompactPrologue(bool is_compacting);
51 static Object** SamplerWindowAddress();
52 static int SamplerWindowSize(); 50 static int SamplerWindowSize();
51 static void UpdateSamplesAfterScavenge();
52 static void RemoveDeadSamples();
53 static void UpdateSamplesAfterCompact(ObjectVisitor* visitor);
53 }; 54 };
54 55
55 56
56 // Rate limiter intended to be used in the profiler thread. 57 // Rate limiter intended to be used in the profiler thread.
57 class RuntimeProfilerRateLimiter BASE_EMBEDDED { 58 class RuntimeProfilerRateLimiter BASE_EMBEDDED {
58 public: 59 public:
59 RuntimeProfilerRateLimiter() : non_js_ticks_(0) { } 60 RuntimeProfilerRateLimiter() : non_js_ticks_(0) { }
60 61
61 // Suspends the current thread when not executing JavaScript to 62 // Suspends the current thread when not executing JavaScript to
62 // minimize CPU usage. Returns whether this thread was suspended 63 // minimize CPU usage. Returns whether this thread was suspended
63 // (and so might have to check whether profiling is still active.) 64 // (and so might have to check whether profiling is still active.)
64 // 65 //
65 // Does nothing when runtime profiling is not enabled. 66 // Does nothing when runtime profiling is not enabled.
66 bool SuspendIfNecessary(); 67 bool SuspendIfNecessary();
67 68
68 private: 69 private:
69 int non_js_ticks_; 70 int non_js_ticks_;
70 71
71 DISALLOW_COPY_AND_ASSIGN(RuntimeProfilerRateLimiter); 72 DISALLOW_COPY_AND_ASSIGN(RuntimeProfilerRateLimiter);
72 }; 73 };
73 74
74 } } // namespace v8::internal 75 } } // namespace v8::internal
75 76
76 #endif // V8_RUNTIME_PROFILER_H_ 77 #endif // V8_RUNTIME_PROFILER_H_
OLDNEW
« src/heap.cc ('K') | « src/mark-compact.cc ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698