Reviewers: Sven Panne, alph,

Message:
Committed patchset #1 manually as r16117.

Description:
Revert "Deprecate self and total time getters and total sample count getter on
CpuProfileNode"

This reverts commit r16116 due to WebKit compilation breakage. Will reland it
once Blink r155755 is rolled into Chromium.

[email protected]
BUG=None

Committed: https://code.google.com/p/v8/source/detail?r=16117

Please review this at https://codereview.chromium.org/22388003/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M include/v8-profiler.h
  M src/api.cc
  M src/profile-generator.cc
  M test/cctest/test-cpu-profiler.cc


Index: include/v8-profiler.h
diff --git a/include/v8-profiler.h b/include/v8-profiler.h
index e538f4a84068e6836567453eddb1b00b7d0ccbd4..f2128ce0bed6bb35ebcbdca72cfd6e56d892f892 100644
--- a/include/v8-profiler.h
+++ b/include/v8-profiler.h
@@ -61,27 +61,20 @@ class V8_EXPORT CpuProfileNode {
    * Returns total (self + children) execution time of the function,
    * in milliseconds, estimated by samples count.
    */
-  V8_DEPRECATED(double GetTotalTime() const);
+  double GetTotalTime() const;

   /**
    * Returns self execution time of the function, in milliseconds,
    * estimated by samples count.
    */
-  V8_DEPRECATED(double GetSelfTime() const);
+  double GetSelfTime() const;

   /** Returns the count of samples where function exists. */
-  V8_DEPRECATED(double GetTotalSamplesCount() const);
+  double GetTotalSamplesCount() const;

-  /** DEPRECATED. Please use GetHitCount instead.
-    * Returns the count of samples where function was currently executing.
-    */
+ /** Returns the count of samples where function was currently executing. */
   double GetSelfSamplesCount() const;

-  /**
- * Returns the count of samples where the function was currently executing.
-    */
-  unsigned GetHitCount() const;
-
   /** Returns function entry UID. */
   unsigned GetCallUid() const;

Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index eb2ffcff18094e3e3b2fe37c4a1dbe7276ea9e97..c80162aa85e2333ff7db6f0552aa479c66da0a2c 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -7477,6 +7477,8 @@ Handle<String> CpuProfileNode::GetFunctionName() const {


 int CpuProfileNode::GetScriptId() const {
+  i::Isolate* isolate = i::Isolate::Current();
+  IsDeadCheck(isolate, "v8::CpuProfileNode::GetScriptId");
const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
   const i::CodeEntry* entry = node->entry();
   return entry->script_id();
@@ -7493,6 +7495,8 @@ Handle<String> CpuProfileNode::GetScriptResourceName() const {


 int CpuProfileNode::GetLineNumber() const {
+  i::Isolate* isolate = i::Isolate::Current();
+  IsDeadCheck(isolate, "v8::CpuProfileNode::GetLineNumber");
return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number();
 }

@@ -7525,12 +7529,9 @@ double CpuProfileNode::GetSelfSamplesCount() const {
 }


-unsigned CpuProfileNode::GetHitCount() const {
-  return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks();
-}
-
-
 unsigned CpuProfileNode::GetCallUid() const {
+  i::Isolate* isolate = i::Isolate::Current();
+  IsDeadCheck(isolate, "v8::CpuProfileNode::GetCallUid");
return reinterpret_cast<const i::ProfileNode*>(this)->entry()->GetCallUid();
 }

@@ -7541,11 +7542,15 @@ unsigned CpuProfileNode::GetNodeId() const {


 int CpuProfileNode::GetChildrenCount() const {
+  i::Isolate* isolate = i::Isolate::Current();
+  IsDeadCheck(isolate, "v8::CpuProfileNode::GetChildrenCount");
return reinterpret_cast<const i::ProfileNode*>(this)->children()->length();
 }


 const CpuProfileNode* CpuProfileNode::GetChild(int index) const {
+  i::Isolate* isolate = i::Isolate::Current();
+  IsDeadCheck(isolate, "v8::CpuProfileNode::GetChild");
   const i::ProfileNode* child =
       reinterpret_cast<const i::ProfileNode*>(this)->children()->at(index);
   return reinterpret_cast<const CpuProfileNode*>(child);
@@ -7566,6 +7571,8 @@ void CpuProfile::Delete() {


 unsigned CpuProfile::GetUid() const {
+  i::Isolate* isolate = i::Isolate::Current();
+  IsDeadCheck(isolate, "v8::CpuProfile::GetUid");
   return reinterpret_cast<const i::CpuProfile*>(this)->uid();
 }

@@ -7580,6 +7587,8 @@ Handle<String> CpuProfile::GetTitle() const {


 const CpuProfileNode* CpuProfile::GetTopDownRoot() const {
+  i::Isolate* isolate = i::Isolate::Current();
+  IsDeadCheck(isolate, "v8::CpuProfile::GetTopDownRoot");
const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); return reinterpret_cast<const CpuProfileNode*>(profile->top_down()->root());
 }
Index: src/profile-generator.cc
diff --git a/src/profile-generator.cc b/src/profile-generator.cc
index 86bd17b70a08b304dd40af5424127a3659436714..018973b15ec874dd572412255a9347fc4c9e6ae9 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -220,7 +220,7 @@ double ProfileNode::GetTotalMillis() const {


 void ProfileNode::Print(int indent) {
-  OS::Print("%5u %5u %*c %s%s %d #%d",
+  OS::Print("%5u %5u %*c %s%s #%d %d",
             total_ticks_, self_ticks_,
             indent, ' ',
             entry_->name_prefix(),
Index: test/cctest/test-cpu-profiler.cc
diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc index 7b5fc2b0fe7f9daa418ef9cc06338284a7bc0281..2c3f3edad418c41f259c99813aec96679439241f 100644
--- a/test/cctest/test-cpu-profiler.cc
+++ b/test/cctest/test-cpu-profiler.cc
@@ -1369,13 +1369,11 @@ TEST(IdleTime) {
       GetChild(root, ProfileGenerator::kProgramEntryName);
   CHECK_EQ(0, programNode->GetChildrenCount());
   CHECK_GE(programNode->GetSelfSamplesCount(), 3);
-  CHECK_GE(programNode->GetHitCount(), 3);

   const v8::CpuProfileNode* idleNode =
       GetChild(root, ProfileGenerator::kIdleEntryName);
   CHECK_EQ(0, idleNode->GetChildrenCount());
   CHECK_GE(idleNode->GetSelfSamplesCount(), 3);
-  CHECK_GE(idleNode->GetHitCount(), 3);

   cpu_profiler->DeleteAllCpuProfiles();
 }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to