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

Unified Diff: src/cpu-profiler.h

Issue 18344002: Revert "CpuProfiler: eliminate 2 layers of 4 for CodeCreateEvent calls." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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 | « no previous file | src/cpu-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cpu-profiler.h
diff --git a/src/cpu-profiler.h b/src/cpu-profiler.h
index c66f99e17f7af025f64111dc109a413b704946ba..455c89332870caa7a2a87107d77890309e951057 100644
--- a/src/cpu-profiler.h
+++ b/src/cpu-profiler.h
@@ -63,7 +63,7 @@ class CodeEventRecord {
#undef DECLARE_TYPE
Type type;
- mutable unsigned order;
+ unsigned order;
};
@@ -122,21 +122,6 @@ class TickSampleEventRecord {
};
-class CodeEventsContainer {
- public:
- explicit CodeEventsContainer(
- CodeEventRecord::Type type = CodeEventRecord::NONE) {
- generic.type = type;
- }
- union {
- CodeEventRecord generic;
-#define DECLARE_CLASS(ignore, type) type type##_;
- CODE_EVENTS_TYPE_LIST(DECLARE_CLASS)
-#undef DECLARE_TYPE
- };
-};
-
-
// This class implements both the profile events processor thread and
// methods called by event producers: VM and stack sampler threads.
class ProfilerEventsProcessor : public Thread {
@@ -149,8 +134,29 @@ class ProfilerEventsProcessor : public Thread {
virtual void Run();
inline void Stop() { running_ = false; }
INLINE(bool running()) { return running_; }
- void Enqueue(const CodeEventsContainer& event);
+ // Events adding methods. Called by VM threads.
+ void CallbackCreateEvent(Logger::LogEventsAndTags tag,
+ const char* prefix, Name* name,
+ Address start);
+ void CodeCreateEvent(Logger::LogEventsAndTags tag,
+ Name* name,
+ String* resource_name, int line_number,
+ Address start, unsigned size,
+ Address shared,
+ CompilationInfo* info);
+ void CodeCreateEvent(Logger::LogEventsAndTags tag,
+ const char* name,
+ Address start, unsigned size);
+ void CodeCreateEvent(Logger::LogEventsAndTags tag,
+ int args_count,
+ Address start, unsigned size);
+ void CodeMoveEvent(Address from, Address to);
+ void CodeDeleteEvent(Address from);
+ void SharedFunctionInfoMoveEvent(Address from, Address to);
+ void RegExpCodeCreateEvent(Logger::LogEventsAndTags tag,
+ const char* prefix, String* name,
+ Address start, unsigned size);
// Puts current stack into tick sample events buffer.
void AddCurrentStack();
@@ -161,10 +167,19 @@ class ProfilerEventsProcessor : public Thread {
INLINE(TickSample* TickSampleEvent());
private:
+ union CodeEventsContainer {
+ CodeEventRecord generic;
+#define DECLARE_CLASS(ignore, type) type type##_;
+ CODE_EVENTS_TYPE_LIST(DECLARE_CLASS)
+#undef DECLARE_TYPE
+ };
+
// Called from events processing thread (Run() method.)
bool ProcessCodeEvent(unsigned* dequeue_order);
bool ProcessTicks(unsigned dequeue_order);
+ INLINE(static bool FilterOutCodeCreateEvent(Logger::LogEventsAndTags tag));
+
ProfileGenerator* generator_;
CpuProfilesCollection* profiles_;
bool running_;
@@ -189,12 +204,6 @@ class ProfilerEventsProcessor : public Thread {
class CpuProfiler {
public:
explicit CpuProfiler(Isolate* isolate);
-
- CpuProfiler(Isolate* isolate,
- CpuProfilesCollection* test_collection,
- ProfileGenerator* test_generator,
- ProfilerEventsProcessor* test_processor);
-
~CpuProfiler();
void StartProfiling(const char* title, bool record_samples = false);
« no previous file with comments | « no previous file | src/cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698