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

Unified Diff: native_client_sdk/src/libraries/xray/xray.h

Issue 18120003: Update XRay to support x86-64 (RDTSC), use dladdr() as an optional way to (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 6 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 | « native_client_sdk/src/libraries/xray/symtable.c ('k') | native_client_sdk/src/libraries/xray/xray.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/libraries/xray/xray.h
===================================================================
--- native_client_sdk/src/libraries/xray/xray.h (revision 208986)
+++ native_client_sdk/src/libraries/xray/xray.h (working copy)
@@ -20,7 +20,7 @@
#endif
#define XRAY_NO_INSTRUMENT __attribute__((no_instrument_function))
-#define XRAY_INLINE __attribute__((always_inline))
+#define XRAY_INLINE __attribute__((always_inline, no_instrument_function))
#if defined(XRAY)
@@ -32,13 +32,22 @@
const char* str, ...) __attribute__ ((format(printf, 2, 3)));
/* This is the beginning of the public XRay API */
+
+/* Ok if mapfilename is NULL, no symbols will be loaded. On glibc builds,
+ * XRay will also attempt to populate the symbol table with dladdr()
+ */
XRAY_NO_INSTRUMENT void XRayInit(int stack_size, int buffer_size,
int frame_count, const char* mapfilename);
XRAY_NO_INSTRUMENT void XRayShutdown();
XRAY_NO_INSTRUMENT void XRayStartFrame();
XRAY_NO_INSTRUMENT void XRayEndFrame();
XRAY_NO_INSTRUMENT void XRaySetAnnotationFilter(uint32_t filter);
-XRAY_NO_INSTRUMENT void XRaySaveReport(const char* filename, float cutoff);
+XRAY_NO_INSTRUMENT void XRaySaveReport(const char* filename,
+ float percent_cutoff,
+ int cycle_cutoff);
+XRAY_NO_INSTRUMENT void XRayReport(FILE* f,
+ float percent_cutoff,
+ int ticks_cutoff);
#if defined(XRAY_ANNOTATE)
#define XRayAnnotate(...) __XRayAnnotate(__VA_ARGS__)
#define XRayAnnotateFiltered(...) __XRayAnnotateFiltered(__VA_ARGS__)
@@ -56,13 +65,15 @@
#define XRayAnnotateFiltered(...)
inline void XRayInit(int stack_size, int buffer_size,
- int frame_count, const char* mapfilename) {}
+ int frame_count, const char* mapfilename) {}
inline void XRayShutdown() {}
inline void XRayStartFrame() {}
inline void XRayEndFrame() {}
inline void XRaySetAnnotationFilter(uint32_t filter) {}
-inline void XRaySaveReport(const char* filename, float cutoff) {}
-
+inline void XRaySaveReport(const char* filename,
+ float percent_cutoff,
+ int cycle_cutoff) {}
+inline void XRayReport(FILE* f, float percent_cutoff, int ticks_cutoff);
#endif /* defined(XRAY) */
#ifdef __cplusplus
« no previous file with comments | « native_client_sdk/src/libraries/xray/symtable.c ('k') | native_client_sdk/src/libraries/xray/xray.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698