Revision: 15260
Author:   [email protected]
Date:     Fri Jun 21 00:56:22 2013
Log:      Delete deprecated methods from v8-profiler.h

All these methods were already marked as V8_DEPRECATED in V8 Version 3.18.0 (see https://code.google.com/p/v8/source/browse/trunk/include/v8-profiler.h?r=14304) so it is time to delete them.

BUG=None
[email protected], [email protected]

Review URL: https://codereview.chromium.org/17524007
http://code.google.com/p/v8/source/detail?r=15260

Modified:
 /branches/bleeding_edge/include/v8-profiler.h
 /branches/bleeding_edge/src/api.cc
 /branches/bleeding_edge/src/global-handles.h
 /branches/bleeding_edge/test/cctest/test-api.cc

=======================================
--- /branches/bleeding_edge/include/v8-profiler.h       Tue May 28 01:00:16 2013
+++ /branches/bleeding_edge/include/v8-profiler.h       Fri Jun 21 00:56:22 2013
@@ -172,18 +172,12 @@
    * obtaining profiling results.
    */

-  /** Deprecated. Use GetProfileCount instead. */
-  V8_DEPRECATED(static int GetProfilesCount());
   /**
    * Returns the number of profiles collected (doesn't include
    * profiles that are being collected at the moment of call.)
    */
   int GetProfileCount();

-  /** Deprecated. Use GetCpuProfile instead. */
-  V8_DEPRECATED(static const CpuProfile* GetProfile(
-      int index,
-      Handle<Value> security_token = Handle<Value>()));
   /** Deprecated. Use GetCpuProfile with single parameter. */
   V8_DEPRECATED(const CpuProfile* GetCpuProfile(
       int index,
@@ -191,18 +185,11 @@
   /** Returns a profile by index. */
   const CpuProfile* GetCpuProfile(int index);

-  /** Deprecated. Use FindProfile instead. */
-  V8_DEPRECATED(static const CpuProfile* FindProfile(
-      unsigned uid,
-      Handle<Value> security_token = Handle<Value>()));
   /** Returns a profile by uid. */
   V8_DEPRECATED(const CpuProfile* FindCpuProfile(
       unsigned uid,
       Handle<Value> security_token = Handle<Value>()));

-  /** Deprecated. Use StartCpuProfiling instead. */
-  V8_DEPRECATED(static void StartProfiling(Handle<String> title,
-                                           bool record_samples = false));
   /**
    * Starts collecting CPU profile. Title may be an empty string. It
    * is allowed to have several profiles being collected at
@@ -216,10 +203,6 @@
    */
void StartCpuProfiling(Handle<String> title, bool record_samples = false);

-  /** Deprecated. Use StopCpuProfiling instead. */
-  V8_DEPRECATED(static const CpuProfile* StopProfiling(
-      Handle<String> title,
-      Handle<Value> security_token = Handle<Value>()));
   /**
    * Deprecated. Use StopCpuProfiling with one parameter instead.
    */
@@ -232,8 +215,6 @@
    */
   const CpuProfile* StopCpuProfiling(Handle<String> title);

-  /** Deprecated. Use DeleteAllCpuProfiles instead. */
-  V8_DEPRECATED(static void DeleteAllProfiles());
   /**
    * Deletes all existing profiles, also cancelling all profiling
    * activity.  All previously returned pointers to profiles and their
@@ -346,16 +327,10 @@
  */
 class V8EXPORT HeapSnapshot {
  public:
-  enum Type {
-    kFull = 0  // Heap snapshot with all instances and references.
-  };
   enum SerializationFormat {
     kJSON = 0  // See format description near 'Serialize' method.
   };

-  /** Deprecated. Returns kFull. */
-  V8_DEPRECATED(Type GetType() const);
-
   /** Returns heap snapshot UID (assigned by the profiler.) */
   unsigned GetUid() const;

@@ -431,24 +406,15 @@
   typedef RetainedObjectInfo* (*WrapperInfoCallback)
       (uint16_t class_id, Handle<Value> wrapper);

-  /** Deprecated. Use GetSnapshotCount instead. */
-  V8_DEPRECATED(static int GetSnapshotsCount());
   /** Returns the number of snapshots taken. */
   int GetSnapshotCount();

-  /** Deprecated. Use GetHeapSnapshot instead. */
-  V8_DEPRECATED(static const HeapSnapshot* GetSnapshot(int index));
   /** Returns a snapshot by index. */
   const HeapSnapshot* GetHeapSnapshot(int index);

-  /** Deprecated. Use FindHeapSnapshot instead. */
-  V8_DEPRECATED(static const HeapSnapshot* FindSnapshot(unsigned uid));
   /** Returns a profile by uid. */
   V8_DEPRECATED(const HeapSnapshot* FindHeapSnapshot(unsigned uid));

-  /** Deprecated. Use GetObjectId instead. */
-  V8_DEPRECATED(static SnapshotObjectId GetSnapshotObjectId(
-      Handle<Value> value));
   /**
    * Returns SnapshotObjectId for a heap object referenced by |value| if
    * it has been seen by the heap profiler, kUnknownObjectId otherwise.
@@ -476,12 +442,6 @@
     virtual ~ObjectNameResolver() {}
   };

-  /** Deprecated. Use TakeHeapSnapshot instead. */
-  V8_DEPRECATED(static const HeapSnapshot* TakeSnapshot(
-      Handle<String> title,
-      HeapSnapshot::Type type = HeapSnapshot::kFull,
-      ActivityControl* control = NULL,
-      ObjectNameResolver* global_object_name_resolver = NULL));
   /**
    * Takes a heap snapshot and returns it. Title may be an empty string.
    */
@@ -490,9 +450,6 @@
       ActivityControl* control = NULL,
       ObjectNameResolver* global_object_name_resolver = NULL);

-
-  /** Deprecated. Use StartTrackingHeapObjects instead. */
-  V8_DEPRECATED(static void StartHeapObjectsTracking());
   /**
    * Starts tracking of heap objects population statistics. After calling
* this method, all heap objects relocations done by the garbage collector
@@ -500,9 +457,6 @@
    */
   void StartTrackingHeapObjects();

-  /** Deprecated. Use GetHeapStats instead. */
-  V8_DEPRECATED(static SnapshotObjectId PushHeapObjectsStats(
-      OutputStream* stream));
   /**
    * Adds a new time interval entry to the aggregated statistics array. The
    * time interval entry contains information on the current heap objects
@@ -517,8 +471,6 @@
    */
   SnapshotObjectId GetHeapStats(OutputStream* stream);

-  /** Deprecated. Use StopTrackingHeapObjects instead. */
-  V8_DEPRECATED(static void StopHeapObjectsTracking());
   /**
    * Stops tracking of heap objects population statistics, cleans up all
    * collected data. StartHeapObjectsTracking must be called again prior to
@@ -526,18 +478,12 @@
    */
   void StopTrackingHeapObjects();

-  /** Deprecated. Use DeleteAllHeapSnapshots instead. */
-  V8_DEPRECATED(static void DeleteAllSnapshots());
   /**
    * Deletes all snapshots taken. All previously returned pointers to
    * snapshots and their contents become invalid after this call.
    */
   void DeleteAllHeapSnapshots();

-  /** Deprecated. Use SetWrapperClassInfoProvider instead. */
-  V8_DEPRECATED(static void DefineWrapperClass(
-      uint16_t class_id,
-      WrapperInfoCallback callback));
   /** Binds a callback to embedder's class ID. */
   void SetWrapperClassInfoProvider(
       uint16_t class_id,
@@ -550,13 +496,6 @@
    */
   static const uint16_t kPersistentHandleNoClassId = 0;

-  /**
- * Deprecated. Returns the number of currently existing persistent handles.
-   */
-  V8_DEPRECATED(static int GetPersistentHandleCount());
-
-  /** Deprecated. Use GetHeapProfilerMemorySize instead. */
-  V8_DEPRECATED(static size_t GetMemorySizeUsedByProfiler());
   /** Returns memory used for profiler internal data and snapshots. */
   size_t GetProfilerMemorySize();

@@ -590,7 +529,7 @@
  * objects for heap snapshots, he can do it in a GC prologue
  * handler, and / or by assigning wrapper class ids in the following way:
  *
- *  1. Bind a callback to class id by calling DefineWrapperClass.
+ *  1. Bind a callback to class id by calling SetWrapperClassInfoProvider.
  *  2. Call SetWrapperClassId on certain persistent handles.
  *
  * V8 takes ownership of RetainedObjectInfo instances passed to it and
=======================================
--- /branches/bleeding_edge/src/api.cc  Thu Jun 20 05:53:19 2013
+++ /branches/bleeding_edge/src/api.cc  Fri Jun 21 00:56:22 2013
@@ -7323,33 +7323,11 @@
 int CpuProfile::GetSamplesCount() const {
   return reinterpret_cast<const i::CpuProfile*>(this)->samples_count();
 }
-
-
-int CpuProfiler::GetProfilesCount() {
-  i::Isolate* isolate = i::Isolate::Current();
-  IsDeadCheck(isolate, "v8::CpuProfiler::GetProfilesCount");
-  i::CpuProfiler* profiler = isolate->cpu_profiler();
-  ASSERT(profiler != NULL);
-  return profiler->GetProfilesCount();
-}


 int CpuProfiler::GetProfileCount() {
   return reinterpret_cast<i::CpuProfiler*>(this)->GetProfilesCount();
 }
-
-
-const CpuProfile* CpuProfiler::GetProfile(int index,
-                                          Handle<Value> security_token) {
-  i::Isolate* isolate = i::Isolate::Current();
-  IsDeadCheck(isolate, "v8::CpuProfiler::GetProfile");
-  i::CpuProfiler* profiler = isolate->cpu_profiler();
-  ASSERT(profiler != NULL);
-  return reinterpret_cast<const CpuProfile*>(
-      profiler->GetProfile(
- security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token),
-          index));
-}


 const CpuProfile* CpuProfiler::GetCpuProfile(int index,
@@ -7365,19 +7343,6 @@
   return reinterpret_cast<const CpuProfile*>(
       reinterpret_cast<i::CpuProfiler*>(this)->GetProfile(NULL, index));
 }
-
-
-const CpuProfile* CpuProfiler::FindProfile(unsigned uid,
-                                           Handle<Value> security_token) {
-  i::Isolate* isolate = i::Isolate::Current();
-  IsDeadCheck(isolate, "v8::CpuProfiler::FindProfile");
-  i::CpuProfiler* profiler = isolate->cpu_profiler();
-  ASSERT(profiler != NULL);
-  return reinterpret_cast<const CpuProfile*>(
-      profiler->FindProfile(
- security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token),
-          uid));
-}


 const CpuProfile* CpuProfiler::FindCpuProfile(unsigned uid,
@@ -7387,34 +7352,12 @@
security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token),
           uid));
 }
-
-
-void CpuProfiler::StartProfiling(Handle<String> title, bool record_samples) {
-  i::Isolate* isolate = i::Isolate::Current();
-  IsDeadCheck(isolate, "v8::CpuProfiler::StartProfiling");
-  i::CpuProfiler* profiler = isolate->cpu_profiler();
-  ASSERT(profiler != NULL);
-  profiler->StartProfiling(*Utils::OpenHandle(*title), record_samples);
-}


void CpuProfiler::StartCpuProfiling(Handle<String> title, bool record_samples) {
   reinterpret_cast<i::CpuProfiler*>(this)->StartProfiling(
       *Utils::OpenHandle(*title), record_samples);
 }
-
-
-const CpuProfile* CpuProfiler::StopProfiling(Handle<String> title,
- Handle<Value> security_token) {
-  i::Isolate* isolate = i::Isolate::Current();
-  IsDeadCheck(isolate, "v8::CpuProfiler::StopProfiling");
-  i::CpuProfiler* profiler = isolate->cpu_profiler();
-  ASSERT(profiler != NULL);
-  return reinterpret_cast<const CpuProfile*>(
-      profiler->StopProfiling(
- security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token),
-          *Utils::OpenHandle(*title)));
-}


 const CpuProfile* CpuProfiler::StopCpuProfiling(Handle<String> title,
@@ -7432,15 +7375,6 @@
           NULL,
           *Utils::OpenHandle(*title)));
 }
-
-
-void CpuProfiler::DeleteAllProfiles() {
-  i::Isolate* isolate = i::Isolate::Current();
-  IsDeadCheck(isolate, "v8::CpuProfiler::DeleteAllProfiles");
-  i::CpuProfiler* profiler = isolate->cpu_profiler();
-  ASSERT(profiler != NULL);
-  profiler->DeleteAllProfiles();
-}


 void CpuProfiler::DeleteAllCpuProfiles() {
@@ -7574,13 +7508,6 @@
     isolate->heap_profiler()->DeleteAllSnapshots();
   }
 }
-
-
-HeapSnapshot::Type HeapSnapshot::GetType() const {
-  i::Isolate* isolate = i::Isolate::Current();
-  IsDeadCheck(isolate, "v8::HeapSnapshot::GetType");
-  return kFull;
-}


 unsigned HeapSnapshot::GetUid() const {
@@ -7651,72 +7578,29 @@
   i::HeapSnapshotJSONSerializer serializer(ToInternal(this));
   serializer.Serialize(stream);
 }
-
-
-int HeapProfiler::GetSnapshotsCount() {
-  i::Isolate* isolate = i::Isolate::Current();
-  IsDeadCheck(isolate, "v8::HeapProfiler::GetSnapshotsCount");
-  return isolate->heap_profiler()->GetSnapshotsCount();
-}


 int HeapProfiler::GetSnapshotCount() {
   return reinterpret_cast<i::HeapProfiler*>(this)->GetSnapshotsCount();
 }
-
-
-const HeapSnapshot* HeapProfiler::GetSnapshot(int index) {
-  i::Isolate* isolate = i::Isolate::Current();
-  IsDeadCheck(isolate, "v8::HeapProfiler::GetSnapshot");
-  return reinterpret_cast<const HeapSnapshot*>(
-      isolate->heap_profiler()->GetSnapshot(index));
-}


 const HeapSnapshot* HeapProfiler::GetHeapSnapshot(int index) {
   return reinterpret_cast<const HeapSnapshot*>(
       reinterpret_cast<i::HeapProfiler*>(this)->GetSnapshot(index));
 }
-
-
-const HeapSnapshot* HeapProfiler::FindSnapshot(unsigned uid) {
-  i::Isolate* isolate = i::Isolate::Current();
-  IsDeadCheck(isolate, "v8::HeapProfiler::FindSnapshot");
-  return reinterpret_cast<const HeapSnapshot*>(
-      isolate->heap_profiler()->FindSnapshot(uid));
-}


 const HeapSnapshot* HeapProfiler::FindHeapSnapshot(unsigned uid) {
   return reinterpret_cast<const HeapSnapshot*>(
       reinterpret_cast<i::HeapProfiler*>(this)->FindSnapshot(uid));
 }
-
-
-SnapshotObjectId HeapProfiler::GetSnapshotObjectId(Handle<Value> value) {
-  i::Isolate* isolate = i::Isolate::Current();
-  IsDeadCheck(isolate, "v8::HeapProfiler::GetSnapshotObjectId");
-  i::Handle<i::Object> obj = Utils::OpenHandle(*value);
-  return isolate->heap_profiler()->GetSnapshotObjectId(obj);
-}


 SnapshotObjectId HeapProfiler::GetObjectId(Handle<Value> value) {
   i::Handle<i::Object> obj = Utils::OpenHandle(*value);
return reinterpret_cast<i::HeapProfiler*>(this)->GetSnapshotObjectId(obj);
 }
-
-
-const HeapSnapshot* HeapProfiler::TakeSnapshot(Handle<String> title,
-                                               HeapSnapshot::Type type,
-                                               ActivityControl* control,
- ObjectNameResolver* resolver) {
-  i::Isolate* isolate = i::Isolate::Current();
-  IsDeadCheck(isolate, "v8::HeapProfiler::TakeSnapshot");
-  return reinterpret_cast<const HeapSnapshot*>(
-      isolate->heap_profiler()->TakeSnapshot(
-          *Utils::OpenHandle(*title), control, resolver));
-}


 const HeapSnapshot* HeapProfiler::TakeHeapSnapshot(
@@ -7727,61 +7611,26 @@
       reinterpret_cast<i::HeapProfiler*>(this)->TakeSnapshot(
           *Utils::OpenHandle(*title), control, resolver));
 }
-
-
-void HeapProfiler::StartHeapObjectsTracking() {
-  i::Isolate* isolate = i::Isolate::Current();
-  IsDeadCheck(isolate, "v8::HeapProfiler::StartHeapObjectsTracking");
-  isolate->heap_profiler()->StartHeapObjectsTracking();
-}


 void HeapProfiler::StartTrackingHeapObjects() {
   reinterpret_cast<i::HeapProfiler*>(this)->StartHeapObjectsTracking();
 }
-
-
-void HeapProfiler::StopHeapObjectsTracking() {
-  i::Isolate* isolate = i::Isolate::Current();
-  IsDeadCheck(isolate, "v8::HeapProfiler::StopHeapObjectsTracking");
-  isolate->heap_profiler()->StopHeapObjectsTracking();
-}


 void HeapProfiler::StopTrackingHeapObjects() {
   reinterpret_cast<i::HeapProfiler*>(this)->StopHeapObjectsTracking();
 }
-
-
-SnapshotObjectId HeapProfiler::PushHeapObjectsStats(OutputStream* stream) {
-  i::Isolate* isolate = i::Isolate::Current();
-  IsDeadCheck(isolate, "v8::HeapProfiler::PushHeapObjectsStats");
-  return isolate->heap_profiler()->PushHeapObjectsStats(stream);
-}


 SnapshotObjectId HeapProfiler::GetHeapStats(OutputStream* stream) {
return reinterpret_cast<i::HeapProfiler*>(this)->PushHeapObjectsStats(stream);
 }
-
-
-void HeapProfiler::DeleteAllSnapshots() {
-  i::Isolate* isolate = i::Isolate::Current();
-  IsDeadCheck(isolate, "v8::HeapProfiler::DeleteAllSnapshots");
-  isolate->heap_profiler()->DeleteAllSnapshots();
-}


 void HeapProfiler::DeleteAllHeapSnapshots() {
   reinterpret_cast<i::HeapProfiler*>(this)->DeleteAllSnapshots();
 }
-
-
-void HeapProfiler::DefineWrapperClass(uint16_t class_id,
-                                      WrapperInfoCallback callback) {
-  i::Isolate::Current()->heap_profiler()->DefineWrapperClass(class_id,
-                                                             callback);
-}


 void HeapProfiler::SetWrapperClassInfoProvider(uint16_t class_id,
@@ -7789,17 +7638,6 @@
   reinterpret_cast<i::HeapProfiler*>(this)->DefineWrapperClass(class_id,
                                                                callback);
 }
-
-
-int HeapProfiler::GetPersistentHandleCount() {
-  i::Isolate* isolate = i::Isolate::Current();
-  return isolate->global_handles()->NumberOfGlobalHandles();
-}
-
-
-size_t HeapProfiler::GetMemorySizeUsedByProfiler() {
- return i::Isolate::Current()->heap_profiler()->GetMemorySizeUsedByProfiler();
-}


 size_t HeapProfiler::GetProfilerMemorySize() {
=======================================
--- /branches/bleeding_edge/src/global-handles.h        Mon Jun  3 01:17:04 2013
+++ /branches/bleeding_edge/src/global-handles.h        Fri Jun 21 00:56:22 2013
@@ -152,7 +152,7 @@
   int NumberOfGlobalObjectWeakHandles();

   // Returns the current number of handles to global objects.
-  int NumberOfGlobalHandles() {
+  int global_handles_count() const {
     return number_of_global_handles_;
   }

=======================================
--- /branches/bleeding_edge/test/cctest/test-api.cc     Thu Jun 20 07:47:35 2013
+++ /branches/bleeding_edge/test/cctest/test-api.cc     Fri Jun 21 00:56:22 2013
@@ -2956,7 +2956,7 @@
   }
   v8::internal::GlobalHandles* global_handles =
       reinterpret_cast<v8::internal::Isolate*>(isolate)->global_handles();
-  int initial_handle_count = global_handles->NumberOfGlobalHandles();
+  int initial_handle_count = global_handles->global_handles_count();
   {
     v8::HandleScope scope(isolate);
     CHECK_EQ(v8::Local<String>::New(isolate, global)->Length(), 3);
@@ -2965,13 +2965,13 @@
     v8::HandleScope scope(isolate);
     global.Reset(isolate, v8_str("longer"));
   }
-  CHECK_EQ(global_handles->NumberOfGlobalHandles(), initial_handle_count);
+  CHECK_EQ(global_handles->global_handles_count(), initial_handle_count);
   {
     v8::HandleScope scope(isolate);
     CHECK_EQ(v8::Local<String>::New(isolate, global)->Length(), 6);
   }
   global.Dispose(isolate);
- CHECK_EQ(global_handles->NumberOfGlobalHandles(), initial_handle_count - 1); + CHECK_EQ(global_handles->global_handles_count(), initial_handle_count - 1);
 }


@@ -2984,7 +2984,7 @@
   }
   v8::internal::GlobalHandles* global_handles =
       reinterpret_cast<v8::internal::Isolate*>(isolate)->global_handles();
-  int initial_handle_count = global_handles->NumberOfGlobalHandles();
+  int initial_handle_count = global_handles->global_handles_count();
   {
     v8::HandleScope scope(isolate);
     CHECK_EQ(v8::Local<String>::New(isolate, global)->Length(), 3);
@@ -2995,7 +2995,7 @@
     global.Reset(isolate, empty);
   }
   CHECK(global.IsEmpty());
- CHECK_EQ(global_handles->NumberOfGlobalHandles(), initial_handle_count - 1); + CHECK_EQ(global_handles->global_handles_count(), initial_handle_count - 1);
 }


@@ -3009,15 +3009,15 @@
     Local<String> str = v8_str("str");
     global_handles =
reinterpret_cast<v8::internal::Isolate*>(isolate)->global_handles();
-    initial_handle_count = global_handles->NumberOfGlobalHandles();
+    initial_handle_count = global_handles->global_handles_count();
     global.Reset(isolate, str);
   }
- CHECK_EQ(global_handles->NumberOfGlobalHandles(), initial_handle_count + 1); + CHECK_EQ(global_handles->global_handles_count(), initial_handle_count + 1);
   String* str = global.ClearAndLeak();
   CHECK(global.IsEmpty());
- CHECK_EQ(global_handles->NumberOfGlobalHandles(), initial_handle_count + 1); + CHECK_EQ(global_handles->global_handles_count(), initial_handle_count + 1);
   global_handles->Destroy(reinterpret_cast<i::Object**>(str));
-  CHECK_EQ(global_handles->NumberOfGlobalHandles(), initial_handle_count);
+  CHECK_EQ(global_handles->global_handles_count(), initial_handle_count);
 }


--
--
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