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

Unified Diff: include/v8.h

Issue 42020: - Added ability to call histograms from within v8... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
===================================================================
--- include/v8.h (revision 1503)
+++ include/v8.h (working copy)
@@ -839,7 +839,7 @@
* external string resource.
*/
static Local<String> NewExternal(ExternalStringResource* resource);
-
+
/**
* Associate an external string resource with this string by transforming it
* in place so that existing references to this string in the JavaScript heap
@@ -859,7 +859,7 @@
* external string resource.
*/
static Local<String> NewExternal(ExternalAsciiStringResource* resource);
-
+
/**
* Associate an external string resource with this string by transforming it
* in place so that existing references to this string in the JavaScript heap
@@ -1816,6 +1816,13 @@
typedef int* (*CounterLookupCallback)(const char* name);
+typedef void* (*CreateHistogramCallback)(const char* name,
+ int min,
+ int max,
+ size_t buckets);
+
+typedef void (*AddHistogramSampleCallback)(void* histogram, int sample);
+
// --- F a i l e d A c c e s s C h e c k C a l l b a c k ---
typedef void (*FailedAccessCheckCallback)(Local<Object> target,
AccessType type,
@@ -1906,6 +1913,15 @@
static void SetCounterFunction(CounterLookupCallback);
/**
+ * Enables the host application to provide a mechanism for recording
+ * histograms. The CreateHistogram function returns a
+ * histogram which will later be passed to the AddHistogramSample
+ * function.
+ */
+ static void SetCreateHistogramFunction(CreateHistogramCallback);
+ static void SetAddHistogramSampleFunction(AddHistogramSampleCallback);
+
+ /**
* Enables the computation of a sliding window of states. The sliding
* window information is recorded in statistics counters.
*/
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698