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

Unified Diff: src/log.h

Issue 11552033: This patch is the propagation version of https://codereview.chromium.org/10824032 patch (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years 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
« src/lithium.cc ('K') | « src/lithium.cc ('k') | src/log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.h
===================================================================
--- src/log.h (revision 13212)
+++ src/log.h (working copy)
@@ -76,6 +76,7 @@
class Semaphore;
class Ticker;
class Isolate;
+class JITCodeLineInfo;
#undef LOG
#define LOG(isolate, Call) \
@@ -246,6 +247,15 @@
void CodeMoveEvent(Address from, Address to);
// Emits a code delete event.
void CodeDeleteEvent(Address from);
+ // Emits a code line info add event.
+ void CodeLinePosInfoAddEvent(JITCodeLineInfo* lineinfostruct,
+ int pc_offset,
+ int position,
+ bool is_statement);
+ // Emits a code line info start to record event
+ void CodeStartLinePosInfoRecordEvent(JITCodeLineInfo* lineinfo);
+ // Emits a code line info finish record event
danno 2012/12/20 16:27:20 Can you add comments about the memory management o
+ void CodeEndLinePosInfoRecordEvent(Code* code, void* lineinfostruct);
void SharedFunctionInfoMoveEvent(Address from, Address to);
@@ -358,10 +368,18 @@
~Logger();
// Issue code notifications.
- void IssueCodeAddedEvent(Code* code, const char* name, size_t name_len);
+ void IssueCodeAddedEvent(Code* code,
+ Script* script,
+ const char* name,
+ size_t name_len);
void IssueCodeMovedEvent(Address from, Address to);
void IssueCodeRemovedEvent(Address from);
-
+ void IssueAddCodeLinePosInfoEvent(JITCodeLineInfo* lineinfo,
danno 2012/12/20 16:27:20 why not just line_info? Easier to read.
+ int pc_offset,
+ int position,
+ bool is_statement);
+ void IssueStartCodePosInfoEvent(JITCodeLineInfo* lineinfo);
danno 2012/12/20 16:27:20 why not just line_info? Easier to read.
+ void IssueEndCodePosInfoEvent(Code* code, void* lineinfostruct);
danno 2012/12/20 16:27:20 why not just line_info? Easier to read.
// Emits the profiler's first message.
void ProfilerBeginEvent();
@@ -512,7 +530,35 @@
DISALLOW_IMPLICIT_CONSTRUCTORS(SamplerRegistry);
};
+// This class is used to record the JITted code position info for JIT
+// code profiling.
+class JITCodeLineInfo : public Malloced {
+ public:
+ JITCodeLineInfo() : line_num_info_(10) { }
+ void SetPosition(intptr_t pc, int pos, bool is_statement) {
+ AddCodeLineInfo(LineNumInfo(pc, pos, is_statement));
+ }
+
+ struct LineNumInfo {
+ LineNumInfo(intptr_t pc, int pos, bool is_statement)
+ : pc_(pc), pos_(pos), is_statement_(is_statement) { }
danno 2012/12/20 16:27:20 nit: whitespace formatting needs to be according t
+
+ intptr_t pc_;
+ int pos_;
+ bool is_statement_;
+ };
+
+ List<LineNumInfo>* line_numinfo() {
+ return &line_num_info_;
+ }
+
+ private:
+ void AddCodeLineInfo(const LineNumInfo& line_info) {
+ line_num_info_.Add(line_info);
+ }
+ List<LineNumInfo> line_num_info_;
+};
// Class that extracts stack trace, used for profiling.
class StackTracer : public AllStatic {
public:
« src/lithium.cc ('K') | « src/lithium.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698