2010-03-15 14:11:19 +00:00
|
|
|
// Copyright 2010 the V8 project authors. All rights reserved.
|
2014-04-29 06:42:26 +00:00
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
2010-03-15 14:11:19 +00:00
|
|
|
|
|
|
|
#ifndef V8_PROFILE_GENERATOR_INL_H_
|
|
|
|
#define V8_PROFILE_GENERATOR_INL_H_
|
|
|
|
|
2014-06-03 08:12:43 +00:00
|
|
|
#include "src/profile-generator.h"
|
2010-03-15 14:11:19 +00:00
|
|
|
|
|
|
|
namespace v8 {
|
|
|
|
namespace internal {
|
|
|
|
|
2010-03-19 09:46:53 +00:00
|
|
|
CodeEntry::CodeEntry(Logger::LogEventsAndTags tag,
|
|
|
|
const char* name,
|
2013-07-01 10:12:03 +00:00
|
|
|
const char* name_prefix,
|
2010-03-19 09:46:53 +00:00
|
|
|
const char* resource_name,
|
2013-10-10 13:15:47 +00:00
|
|
|
int line_number,
|
|
|
|
int column_number)
|
2010-09-20 09:29:12 +00:00
|
|
|
: tag_(tag),
|
2013-07-02 07:51:09 +00:00
|
|
|
builtin_id_(Builtins::builtin_count),
|
2010-04-06 10:36:38 +00:00
|
|
|
name_prefix_(name_prefix),
|
2010-03-19 09:46:53 +00:00
|
|
|
name_(name),
|
|
|
|
resource_name_(resource_name),
|
2010-05-18 14:19:33 +00:00
|
|
|
line_number_(line_number),
|
2013-10-10 13:15:47 +00:00
|
|
|
column_number_(column_number),
|
2011-02-22 16:31:24 +00:00
|
|
|
shared_id_(0),
|
2014-03-14 10:20:33 +00:00
|
|
|
script_id_(v8::UnboundScript::kNoScriptId),
|
2013-09-05 13:20:51 +00:00
|
|
|
no_frame_ranges_(NULL),
|
|
|
|
bailout_reason_(kEmptyBailoutReason) { }
|
2010-03-19 09:46:53 +00:00
|
|
|
|
|
|
|
|
2010-04-07 14:18:26 +00:00
|
|
|
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;
|
2010-03-15 14:11:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-04-15 11:37:29 +00:00
|
|
|
ProfileNode::ProfileNode(ProfileTree* tree, CodeEntry* entry)
|
|
|
|
: tree_(tree),
|
|
|
|
entry_(entry),
|
2010-03-15 14:11:19 +00:00
|
|
|
self_ticks_(0),
|
2013-04-02 07:48:25 +00:00
|
|
|
children_(CodeEntriesMatch),
|
2013-09-05 13:20:51 +00:00
|
|
|
id_(tree->next_node_id()) { }
|
2010-03-15 14:11:19 +00:00
|
|
|
|
|
|
|
} } // namespace v8::internal
|
|
|
|
|
|
|
|
#endif // V8_PROFILE_GENERATOR_INL_H_
|