Revision: 15493
Author: [email protected]
Date: Thu Jul 4 09:34:07 2013
Log: Remove deprecated heap profiler methods from V8 public API
v8::HeapProfiler::FindHeapSnapshot was already deprecated when 3.19 branch
was created
(https://code.google.com/p/v8/source/browse/branches/3.19/include/v8-profiler.h).
BUG=None
[email protected], [email protected]
Review URL: https://codereview.chromium.org/18701002
http://code.google.com/p/v8/source/detail?r=15493
Modified:
/branches/bleeding_edge/include/v8-profiler.h
/branches/bleeding_edge/src/api.cc
/branches/bleeding_edge/src/heap-profiler.cc
/branches/bleeding_edge/src/heap-profiler.h
/branches/bleeding_edge/src/heap-snapshot-generator.cc
/branches/bleeding_edge/src/heap-snapshot-generator.h
=======================================
--- /branches/bleeding_edge/include/v8-profiler.h Mon Jul 1 23:14:01 2013
+++ /branches/bleeding_edge/include/v8-profiler.h Thu Jul 4 09:34:07 2013
@@ -415,9 +415,6 @@
/** Returns a snapshot by index. */
const HeapSnapshot* GetHeapSnapshot(int index);
- /** Returns a profile by uid. */
- V8_DEPRECATED(const HeapSnapshot* FindHeapSnapshot(unsigned uid));
-
/**
* Returns SnapshotObjectId for a heap object referenced by |value| if
* it has been seen by the heap profiler, kUnknownObjectId otherwise.
=======================================
--- /branches/bleeding_edge/src/api.cc Wed Jul 3 08:39:18 2013
+++ /branches/bleeding_edge/src/api.cc Thu Jul 4 09:34:07 2013
@@ -7743,12 +7743,6 @@
return reinterpret_cast<const HeapSnapshot*>(
reinterpret_cast<i::HeapProfiler*>(this)->GetSnapshot(index));
}
-
-
-const HeapSnapshot* HeapProfiler::FindHeapSnapshot(unsigned uid) {
- return reinterpret_cast<const HeapSnapshot*>(
- reinterpret_cast<i::HeapProfiler*>(this)->FindSnapshot(uid));
-}
SnapshotObjectId HeapProfiler::GetObjectId(Handle<Value> value) {
=======================================
--- /branches/bleeding_edge/src/heap-profiler.cc Wed Apr 24 08:59:23 2013
+++ /branches/bleeding_edge/src/heap-profiler.cc Thu Jul 4 09:34:07 2013
@@ -122,11 +122,6 @@
HeapSnapshot* HeapProfiler::GetSnapshot(int index) {
return snapshots_->snapshots()->at(index);
}
-
-
-HeapSnapshot* HeapProfiler::FindSnapshot(unsigned uid) {
- return snapshots_->GetSnapshot(uid);
-}
SnapshotObjectId HeapProfiler::GetSnapshotObjectId(Handle<Object> obj) {
=======================================
--- /branches/bleeding_edge/src/heap-profiler.h Thu Jul 4 09:32:12 2013
+++ /branches/bleeding_edge/src/heap-profiler.h Thu Jul 4 09:34:07 2013
@@ -66,7 +66,6 @@
SnapshotObjectId PushHeapObjectsStats(OutputStream* stream);
int GetSnapshotsCount();
HeapSnapshot* GetSnapshot(int index);
- HeapSnapshot* FindSnapshot(unsigned uid);
SnapshotObjectId GetSnapshotObjectId(Handle<Object> obj);
void DeleteAllSnapshots();
=======================================
--- /branches/bleeding_edge/src/heap-snapshot-generator.cc Thu Jul 4
09:32:18 2013
+++ /branches/bleeding_edge/src/heap-snapshot-generator.cc Thu Jul 4
09:34:07 2013
@@ -189,15 +189,11 @@
template <> struct SnapshotSizeConstants<4> {
static const int kExpectedHeapGraphEdgeSize = 12;
static const int kExpectedHeapEntrySize = 24;
- static const int kExpectedHeapSnapshotsCollectionSize = 100;
- static const int kExpectedHeapSnapshotSize = 132;
};
template <> struct SnapshotSizeConstants<8> {
static const int kExpectedHeapGraphEdgeSize = 24;
static const int kExpectedHeapEntrySize = 32;
- static const int kExpectedHeapSnapshotsCollectionSize = 152;
- static const int kExpectedHeapSnapshotSize = 160;
};
} // namespace
@@ -353,8 +349,6 @@
size_t HeapSnapshot::RawSnapshotSize() const {
-
STATIC_CHECK(SnapshotSizeConstants<kPointerSize>::kExpectedHeapSnapshotSize
==
- sizeof(HeapSnapshot)); // NOLINT
return
sizeof(*this) +
GetMemoryUsedByList(entries_) +
@@ -578,7 +572,6 @@
HeapSnapshotsCollection::HeapSnapshotsCollection(Heap* heap)
: is_tracking_objects_(false),
- snapshots_uids_(HeapSnapshotsMatch),
token_enumerator_(new TokenEnumerator()),
ids_(heap) {
}
@@ -607,29 +600,12 @@
ids_.SnapshotGenerationFinished();
if (snapshot != NULL) {
snapshots_.Add(snapshot);
- HashMap::Entry* entry =
- snapshots_uids_.Lookup(reinterpret_cast<void*>(snapshot->uid()),
- static_cast<uint32_t>(snapshot->uid()),
- true);
- ASSERT(entry->value == NULL);
- entry->value = snapshot;
}
}
-
-
-HeapSnapshot* HeapSnapshotsCollection::GetSnapshot(unsigned uid) {
- HashMap::Entry* entry =
snapshots_uids_.Lookup(reinterpret_cast<void*>(uid),
-
static_cast<uint32_t>(uid),
- false);
- return entry != NULL ? reinterpret_cast<HeapSnapshot*>(entry->value) :
NULL;
-}
void HeapSnapshotsCollection::RemoveSnapshot(HeapSnapshot* snapshot) {
snapshots_.RemoveElement(snapshot);
- unsigned uid = snapshot->uid();
- snapshots_uids_.Remove(reinterpret_cast<void*>(uid),
- static_cast<uint32_t>(uid));
}
@@ -656,13 +632,9 @@
size_t HeapSnapshotsCollection::GetUsedMemorySize() const {
- STATIC_CHECK(SnapshotSizeConstants<kPointerSize>::
- kExpectedHeapSnapshotsCollectionSize ==
- sizeof(HeapSnapshotsCollection)); // NOLINT
size_t size = sizeof(*this);
size += names_.GetUsedMemorySize();
size += ids_.GetUsedMemorySize();
- size += sizeof(HashMap::Entry) * snapshots_uids_.capacity();
size += GetMemoryUsedByList(snapshots_);
for (int i = 0; i < snapshots_.length(); ++i) {
size += snapshots_[i]->RawSnapshotSize();
=======================================
--- /branches/bleeding_edge/src/heap-snapshot-generator.h Wed Jul 3
08:39:18 2013
+++ /branches/bleeding_edge/src/heap-snapshot-generator.h Thu Jul 4
09:34:07 2013
@@ -303,7 +303,6 @@
HeapSnapshot* NewSnapshot(const char* name, unsigned uid);
void SnapshotGenerationFinished(HeapSnapshot* snapshot);
List<HeapSnapshot*>* snapshots() { return &snapshots_; }
- HeapSnapshot* GetSnapshot(unsigned uid);
void RemoveSnapshot(HeapSnapshot* snapshot);
StringsStorage* names() { return &names_; }
@@ -323,14 +322,8 @@
size_t GetUsedMemorySize() const;
private:
- INLINE(static bool HeapSnapshotsMatch(void* key1, void* key2)) {
- return key1 == key2;
- }
-
bool is_tracking_objects_; // Whether tracking object moves is needed.
List<HeapSnapshot*> snapshots_;
- // Mapping from snapshots' uids to HeapSnapshot* pointers.
- HashMap snapshots_uids_;
StringsStorage names_;
TokenEnumerator* token_enumerator_;
// Mapping from HeapObject addresses to objects' uids.
--
--
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.