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

Unified Diff: src/runtime-profiler.h

Issue 9361026: Count-based profiling for primitive functions (hidden behind a flag) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: more comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime.cc ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime-profiler.h
diff --git a/src/runtime-profiler.h b/src/runtime-profiler.h
index d35b5df847a68c5cc4689532f368a7b0d81310fd..c01717ca6815b35f615598ccb16a3511a5bae644 100644
--- a/src/runtime-profiler.h
+++ b/src/runtime-profiler.h
@@ -1,4 +1,4 @@
-// Copyright 2010 the V8 project authors. All rights reserved.
+// Copyright 2012 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -61,6 +61,15 @@ class RuntimeProfiler {
Object** SamplerWindowAddress();
int SamplerWindowSize();
+ void NotifyICChanged() { any_ic_changed_ = true; }
+
+ void NotifyCodeGenerated(int generated_code_size) {
+ if (FLAG_counting_profiler) {
+ code_generated_ = true;
+ total_code_generated_ += generated_code_size;
+ }
+ }
+
// Rate limiting support.
// VM thread interface.
@@ -97,7 +106,7 @@ class RuntimeProfiler {
static void HandleWakeUp(Isolate* isolate);
- void Optimize(JSFunction* function);
+ void Optimize(JSFunction* function, const char* reason);
void AttemptOnStackReplacement(JSFunction* function);
@@ -119,6 +128,10 @@ class RuntimeProfiler {
int sampler_window_position_;
int sampler_window_weight_[kSamplerWindowSize];
+ bool any_ic_changed_;
+ bool code_generated_;
+ int total_code_generated_;
+
// Possible state values:
// -1 => the profiler thread is waiting on the semaphore
// 0 or positive => the number of isolates running JavaScript code.
« no previous file with comments | « src/runtime.cc ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698