| Index: src/heap-snapshot-generator-inl.h
|
| diff --git a/src/profile-generator-inl.h b/src/heap-snapshot-generator-inl.h
|
| similarity index 59%
|
| copy from src/profile-generator-inl.h
|
| copy to src/heap-snapshot-generator-inl.h
|
| index e4f32a7c7a4803ef02131f525d35035fcf90c939..1a878c6df17b680b389fa4621e3baefea775be00 100644
|
| --- a/src/profile-generator-inl.h
|
| +++ b/src/heap-snapshot-generator-inl.h
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2010 the V8 project authors. All rights reserved.
|
| +// Copyright 2013 the V8 project authors. All rights reserved.
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| // met:
|
| @@ -25,76 +25,14 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -#ifndef V8_PROFILE_GENERATOR_INL_H_
|
| -#define V8_PROFILE_GENERATOR_INL_H_
|
| +#ifndef V8_HEAP_SNAPSHOT_GENERATOR_INL_H_
|
| +#define V8_HEAP_SNAPSHOT_GENERATOR_INL_H_
|
|
|
| -#include "profile-generator.h"
|
| +#include "heap-snapshot-generator.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
|
|
| -const char* StringsStorage::GetFunctionName(String* name) {
|
| - return GetFunctionName(GetName(name));
|
| -}
|
| -
|
| -
|
| -const char* StringsStorage::GetFunctionName(const char* name) {
|
| - return strlen(name) > 0 ? name : ProfileGenerator::kAnonymousFunctionName;
|
| -}
|
| -
|
| -
|
| -CodeEntry::CodeEntry(Logger::LogEventsAndTags tag,
|
| - const char* name_prefix,
|
| - const char* name,
|
| - const char* resource_name,
|
| - int line_number,
|
| - int security_token_id)
|
| - : tag_(tag),
|
| - name_prefix_(name_prefix),
|
| - name_(name),
|
| - resource_name_(resource_name),
|
| - line_number_(line_number),
|
| - shared_id_(0),
|
| - security_token_id_(security_token_id) {
|
| -}
|
| -
|
| -
|
| -bool CodeEntry::is_js_function_tag(Logger::LogEventsAndTags tag) {
|
| - return tag == Logger::FUNCTION_TAG
|
| - || tag == Logger::LAZY_COMPILE_TAG
|
| - || tag == Logger::SCRIPT_TAG
|
| - || tag == Logger::NATIVE_FUNCTION_TAG
|
| - || tag == Logger::NATIVE_LAZY_COMPILE_TAG
|
| - || tag == Logger::NATIVE_SCRIPT_TAG;
|
| -}
|
| -
|
| -
|
| -ProfileNode::ProfileNode(ProfileTree* tree, CodeEntry* entry)
|
| - : tree_(tree),
|
| - entry_(entry),
|
| - total_ticks_(0),
|
| - self_ticks_(0),
|
| - children_(CodeEntriesMatch) {
|
| -}
|
| -
|
| -
|
| -CodeEntry* ProfileGenerator::EntryForVMState(StateTag tag) {
|
| - switch (tag) {
|
| - case GC:
|
| - return gc_entry_;
|
| - case JS:
|
| - case COMPILER:
|
| - case PARALLEL_COMPILER:
|
| - // DOM events handlers are reported as OTHER / EXTERNAL entries.
|
| - // To avoid confusing people, let's put all these entries into
|
| - // one bucket.
|
| - case OTHER:
|
| - case EXTERNAL:
|
| - return program_entry_;
|
| - default: return NULL;
|
| - }
|
| -}
|
| -
|
|
|
| HeapEntry* HeapGraphEdge::from() const {
|
| return &snapshot()->entries()[from_index_];
|
| @@ -146,4 +84,5 @@ int V8HeapExplorer::GetGcSubrootOrder(HeapObject* subroot) {
|
|
|
| } } // namespace v8::internal
|
|
|
| -#endif // V8_PROFILE_GENERATOR_INL_H_
|
| +#endif // V8_HEAP_SNAPSHOT_GENERATOR_INL_H_
|
| +
|
|
|