diff --git a/toolkit/devtools/server/CoreDump.pb.cc b/toolkit/devtools/server/CoreDump.pb.cc index c82037f3eeb4..44c9c2963894 100644 --- a/toolkit/devtools/server/CoreDump.pb.cc +++ b/toolkit/devtools/server/CoreDump.pb.cc @@ -25,6 +25,16 @@ namespace { const ::google::protobuf::Descriptor* Metadata_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* Metadata_reflection_ = NULL; +const ::google::protobuf::Descriptor* StackFrame_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + StackFrame_reflection_ = NULL; +struct StackFrameOneofInstance { + const ::mozilla::devtools::protobuf::StackFrame_Data* data_; + ::google::protobuf::uint64 ref_; +}* StackFrame_default_oneof_instance_ = NULL; +const ::google::protobuf::Descriptor* StackFrame_Data_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + StackFrame_Data_reflection_ = NULL; const ::google::protobuf::Descriptor* Node_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* Node_reflection_ = NULL; @@ -56,12 +66,54 @@ void protobuf_AssignDesc_CoreDump_2eproto() { ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(Metadata)); - Node_descriptor_ = file->message_type(1); - static const int Node_offsets_[4] = { + StackFrame_descriptor_ = file->message_type(1); + static const int StackFrame_offsets_[3] = { + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(StackFrame_default_oneof_instance_, data_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(StackFrame_default_oneof_instance_, ref_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StackFrame, StackFrameType_), + }; + StackFrame_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + StackFrame_descriptor_, + StackFrame::default_instance_, + StackFrame_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StackFrame, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StackFrame, _unknown_fields_), + -1, + StackFrame_default_oneof_instance_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StackFrame, _oneof_case_[0]), + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(StackFrame)); + StackFrame_Data_descriptor_ = StackFrame_descriptor_->nested_type(0); + static const int StackFrame_Data_offsets_[8] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StackFrame_Data, id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StackFrame_Data, parent_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StackFrame_Data, line_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StackFrame_Data, column_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StackFrame_Data, source_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StackFrame_Data, functiondisplayname_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StackFrame_Data, issystem_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StackFrame_Data, isselfhosted_), + }; + StackFrame_Data_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + StackFrame_Data_descriptor_, + StackFrame_Data::default_instance_, + StackFrame_Data_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StackFrame_Data, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StackFrame_Data, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(StackFrame_Data)); + Node_descriptor_ = file->message_type(2); + static const int Node_offsets_[5] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Node, id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Node, typename__), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Node, size_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Node, edges_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Node, allocationstack_), }; Node_reflection_ = new ::google::protobuf::internal::GeneratedMessageReflection( @@ -74,7 +126,7 @@ void protobuf_AssignDesc_CoreDump_2eproto() { ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(Node)); - Edge_descriptor_ = file->message_type(2); + Edge_descriptor_ = file->message_type(3); static const int Edge_offsets_[2] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Edge, referent_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Edge, name_), @@ -104,6 +156,10 @@ void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( Metadata_descriptor_, &Metadata::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + StackFrame_descriptor_, &StackFrame::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + StackFrame_Data_descriptor_, &StackFrame_Data::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( Node_descriptor_, &Node::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( @@ -115,6 +171,11 @@ void protobuf_RegisterTypes(const ::std::string&) { void protobuf_ShutdownFile_CoreDump_2eproto() { delete Metadata::default_instance_; delete Metadata_reflection_; + delete StackFrame::default_instance_; + delete StackFrame_default_oneof_instance_; + delete StackFrame_reflection_; + delete StackFrame_Data::default_instance_; + delete StackFrame_Data_reflection_; delete Node::default_instance_; delete Node_reflection_; delete Edge::default_instance_; @@ -129,17 +190,31 @@ void protobuf_AddDesc_CoreDump_2eproto() { ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( "\n\016CoreDump.proto\022\031mozilla.devtools.proto" - "buf\"\035\n\010Metadata\022\021\n\ttimeStamp\030\001 \001(\004\"b\n\004No" - "de\022\n\n\002id\030\001 \001(\004\022\020\n\010typeName\030\002 \001(\014\022\014\n\004size" - "\030\003 \001(\004\022.\n\005edges\030\004 \003(\0132\037.mozilla.devtools" - ".protobuf.Edge\"&\n\004Edge\022\020\n\010referent\030\001 \001(\004" - "\022\014\n\004name\030\002 \001(\014", 214); + "buf\"\035\n\010Metadata\022\021\n\ttimeStamp\030\001 \001(\004\"\250\002\n\nS" + "tackFrame\022:\n\004data\030\001 \001(\0132*.mozilla.devtoo" + "ls.protobuf.StackFrame.DataH\000\022\r\n\003ref\030\002 \001" + "(\004H\000\032\274\001\n\004Data\022\n\n\002id\030\001 \001(\004\0225\n\006parent\030\002 \001(" + "\0132%.mozilla.devtools.protobuf.StackFrame" + "\022\014\n\004line\030\003 \001(\r\022\016\n\006column\030\004 \001(\r\022\016\n\006source" + "\030\005 \001(\014\022\033\n\023functionDisplayName\030\006 \001(\014\022\020\n\010i" + "sSystem\030\007 \001(\010\022\024\n\014isSelfHosted\030\010 \001(\010B\020\n\016S" + "tackFrameType\"\242\001\n\004Node\022\n\n\002id\030\001 \001(\004\022\020\n\010ty" + "peName\030\002 \001(\014\022\014\n\004size\030\003 \001(\004\022.\n\005edges\030\004 \003(" + "\0132\037.mozilla.devtools.protobuf.Edge\022>\n\017al" + "locationStack\030\005 \001(\0132%.mozilla.devtools.p" + "rotobuf.StackFrame\"&\n\004Edge\022\020\n\010referent\030\001" + " \001(\004\022\014\n\004name\030\002 \001(\014", 578); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "CoreDump.proto", &protobuf_RegisterTypes); Metadata::default_instance_ = new Metadata(); + StackFrame::default_instance_ = new StackFrame(); + StackFrame_default_oneof_instance_ = new StackFrameOneofInstance; + StackFrame_Data::default_instance_ = new StackFrame_Data(); Node::default_instance_ = new Node(); Edge::default_instance_ = new Edge(); Metadata::default_instance_->InitAsDefaultInstance(); + StackFrame::default_instance_->InitAsDefaultInstance(); + StackFrame_Data::default_instance_->InitAsDefaultInstance(); Node::default_instance_->InitAsDefaultInstance(); Edge::default_instance_->InitAsDefaultInstance(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_CoreDump_2eproto); @@ -374,6 +449,825 @@ void Metadata::Swap(Metadata* other) { } +// =================================================================== + +#ifndef _MSC_VER +const int StackFrame_Data::kIdFieldNumber; +const int StackFrame_Data::kParentFieldNumber; +const int StackFrame_Data::kLineFieldNumber; +const int StackFrame_Data::kColumnFieldNumber; +const int StackFrame_Data::kSourceFieldNumber; +const int StackFrame_Data::kFunctionDisplayNameFieldNumber; +const int StackFrame_Data::kIsSystemFieldNumber; +const int StackFrame_Data::kIsSelfHostedFieldNumber; +#endif // !_MSC_VER + +StackFrame_Data::StackFrame_Data() + : ::google::protobuf::Message() { + SharedCtor(); + // @@protoc_insertion_point(constructor:mozilla.devtools.protobuf.StackFrame.Data) +} + +void StackFrame_Data::InitAsDefaultInstance() { + parent_ = const_cast< ::mozilla::devtools::protobuf::StackFrame*>(&::mozilla::devtools::protobuf::StackFrame::default_instance()); +} + +StackFrame_Data::StackFrame_Data(const StackFrame_Data& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:mozilla.devtools.protobuf.StackFrame.Data) +} + +void StackFrame_Data::SharedCtor() { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + id_ = GOOGLE_ULONGLONG(0); + parent_ = NULL; + line_ = 0u; + column_ = 0u; + source_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + functiondisplayname_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + issystem_ = false; + isselfhosted_ = false; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +StackFrame_Data::~StackFrame_Data() { + // @@protoc_insertion_point(destructor:mozilla.devtools.protobuf.StackFrame.Data) + SharedDtor(); +} + +void StackFrame_Data::SharedDtor() { + if (source_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + delete source_; + } + if (functiondisplayname_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + delete functiondisplayname_; + } + if (this != default_instance_) { + delete parent_; + } +} + +void StackFrame_Data::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* StackFrame_Data::descriptor() { + protobuf_AssignDescriptorsOnce(); + return StackFrame_Data_descriptor_; +} + +const StackFrame_Data& StackFrame_Data::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_CoreDump_2eproto(); + return *default_instance_; +} + +StackFrame_Data* StackFrame_Data::default_instance_ = NULL; + +StackFrame_Data* StackFrame_Data::New() const { + return new StackFrame_Data; +} + +void StackFrame_Data::Clear() { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + if (_has_bits_[0 / 32] & 255) { + ZR_(line_, column_); + ZR_(issystem_, isselfhosted_); + id_ = GOOGLE_ULONGLONG(0); + if (has_parent()) { + if (parent_ != NULL) parent_->::mozilla::devtools::protobuf::StackFrame::Clear(); + } + if (has_source()) { + if (source_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + source_->clear(); + } + } + if (has_functiondisplayname()) { + if (functiondisplayname_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + functiondisplayname_->clear(); + } + } + } + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool StackFrame_Data::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:mozilla.devtools.protobuf.StackFrame.Data) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional uint64 id = 1; + case 1: { + if (tag == 8) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &id_))); + set_has_id(); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_parent; + break; + } + + // optional .mozilla.devtools.protobuf.StackFrame parent = 2; + case 2: { + if (tag == 18) { + parse_parent: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_parent())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(24)) goto parse_line; + break; + } + + // optional uint32 line = 3; + case 3: { + if (tag == 24) { + parse_line: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &line_))); + set_has_line(); + } else { + goto handle_unusual; + } + if (input->ExpectTag(32)) goto parse_column; + break; + } + + // optional uint32 column = 4; + case 4: { + if (tag == 32) { + parse_column: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &column_))); + set_has_column(); + } else { + goto handle_unusual; + } + if (input->ExpectTag(42)) goto parse_source; + break; + } + + // optional bytes source = 5; + case 5: { + if (tag == 42) { + parse_source: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_source())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(50)) goto parse_functionDisplayName; + break; + } + + // optional bytes functionDisplayName = 6; + case 6: { + if (tag == 50) { + parse_functionDisplayName: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_functiondisplayname())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(56)) goto parse_isSystem; + break; + } + + // optional bool isSystem = 7; + case 7: { + if (tag == 56) { + parse_isSystem: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &issystem_))); + set_has_issystem(); + } else { + goto handle_unusual; + } + if (input->ExpectTag(64)) goto parse_isSelfHosted; + break; + } + + // optional bool isSelfHosted = 8; + case 8: { + if (tag == 64) { + parse_isSelfHosted: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &isselfhosted_))); + set_has_isselfhosted(); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:mozilla.devtools.protobuf.StackFrame.Data) + return true; +failure: + // @@protoc_insertion_point(parse_failure:mozilla.devtools.protobuf.StackFrame.Data) + return false; +#undef DO_ +} + +void StackFrame_Data::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:mozilla.devtools.protobuf.StackFrame.Data) + // optional uint64 id = 1; + if (has_id()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->id(), output); + } + + // optional .mozilla.devtools.protobuf.StackFrame parent = 2; + if (has_parent()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->parent(), output); + } + + // optional uint32 line = 3; + if (has_line()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->line(), output); + } + + // optional uint32 column = 4; + if (has_column()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->column(), output); + } + + // optional bytes source = 5; + if (has_source()) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 5, this->source(), output); + } + + // optional bytes functionDisplayName = 6; + if (has_functiondisplayname()) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 6, this->functiondisplayname(), output); + } + + // optional bool isSystem = 7; + if (has_issystem()) { + ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->issystem(), output); + } + + // optional bool isSelfHosted = 8; + if (has_isselfhosted()) { + ::google::protobuf::internal::WireFormatLite::WriteBool(8, this->isselfhosted(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:mozilla.devtools.protobuf.StackFrame.Data) +} + +::google::protobuf::uint8* StackFrame_Data::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.devtools.protobuf.StackFrame.Data) + // optional uint64 id = 1; + if (has_id()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->id(), target); + } + + // optional .mozilla.devtools.protobuf.StackFrame parent = 2; + if (has_parent()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, this->parent(), target); + } + + // optional uint32 line = 3; + if (has_line()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->line(), target); + } + + // optional uint32 column = 4; + if (has_column()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, this->column(), target); + } + + // optional bytes source = 5; + if (has_source()) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 5, this->source(), target); + } + + // optional bytes functionDisplayName = 6; + if (has_functiondisplayname()) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 6, this->functiondisplayname(), target); + } + + // optional bool isSystem = 7; + if (has_issystem()) { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, this->issystem(), target); + } + + // optional bool isSelfHosted = 8; + if (has_isselfhosted()) { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(8, this->isselfhosted(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.devtools.protobuf.StackFrame.Data) + return target; +} + +int StackFrame_Data::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // optional uint64 id = 1; + if (has_id()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->id()); + } + + // optional .mozilla.devtools.protobuf.StackFrame parent = 2; + if (has_parent()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->parent()); + } + + // optional uint32 line = 3; + if (has_line()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->line()); + } + + // optional uint32 column = 4; + if (has_column()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->column()); + } + + // optional bytes source = 5; + if (has_source()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->source()); + } + + // optional bytes functionDisplayName = 6; + if (has_functiondisplayname()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->functiondisplayname()); + } + + // optional bool isSystem = 7; + if (has_issystem()) { + total_size += 1 + 1; + } + + // optional bool isSelfHosted = 8; + if (has_isselfhosted()) { + total_size += 1 + 1; + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void StackFrame_Data::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const StackFrame_Data* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void StackFrame_Data::MergeFrom(const StackFrame_Data& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_id()) { + set_id(from.id()); + } + if (from.has_parent()) { + mutable_parent()->::mozilla::devtools::protobuf::StackFrame::MergeFrom(from.parent()); + } + if (from.has_line()) { + set_line(from.line()); + } + if (from.has_column()) { + set_column(from.column()); + } + if (from.has_source()) { + set_source(from.source()); + } + if (from.has_functiondisplayname()) { + set_functiondisplayname(from.functiondisplayname()); + } + if (from.has_issystem()) { + set_issystem(from.issystem()); + } + if (from.has_isselfhosted()) { + set_isselfhosted(from.isselfhosted()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void StackFrame_Data::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void StackFrame_Data::CopyFrom(const StackFrame_Data& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool StackFrame_Data::IsInitialized() const { + + return true; +} + +void StackFrame_Data::Swap(StackFrame_Data* other) { + if (other != this) { + std::swap(id_, other->id_); + std::swap(parent_, other->parent_); + std::swap(line_, other->line_); + std::swap(column_, other->column_); + std::swap(source_, other->source_); + std::swap(functiondisplayname_, other->functiondisplayname_); + std::swap(issystem_, other->issystem_); + std::swap(isselfhosted_, other->isselfhosted_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata StackFrame_Data::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = StackFrame_Data_descriptor_; + metadata.reflection = StackFrame_Data_reflection_; + return metadata; +} + + +// ------------------------------------------------------------------- + +#ifndef _MSC_VER +const int StackFrame::kDataFieldNumber; +const int StackFrame::kRefFieldNumber; +#endif // !_MSC_VER + +StackFrame::StackFrame() + : ::google::protobuf::Message() { + SharedCtor(); + // @@protoc_insertion_point(constructor:mozilla.devtools.protobuf.StackFrame) +} + +void StackFrame::InitAsDefaultInstance() { + StackFrame_default_oneof_instance_->data_ = const_cast< ::mozilla::devtools::protobuf::StackFrame_Data*>(&::mozilla::devtools::protobuf::StackFrame_Data::default_instance()); + StackFrame_default_oneof_instance_->ref_ = GOOGLE_ULONGLONG(0); +} + +StackFrame::StackFrame(const StackFrame& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:mozilla.devtools.protobuf.StackFrame) +} + +void StackFrame::SharedCtor() { + _cached_size_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + clear_has_StackFrameType(); +} + +StackFrame::~StackFrame() { + // @@protoc_insertion_point(destructor:mozilla.devtools.protobuf.StackFrame) + SharedDtor(); +} + +void StackFrame::SharedDtor() { + if (has_StackFrameType()) { + clear_StackFrameType(); + } + if (this != default_instance_) { + } +} + +void StackFrame::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* StackFrame::descriptor() { + protobuf_AssignDescriptorsOnce(); + return StackFrame_descriptor_; +} + +const StackFrame& StackFrame::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_CoreDump_2eproto(); + return *default_instance_; +} + +StackFrame* StackFrame::default_instance_ = NULL; + +StackFrame* StackFrame::New() const { + return new StackFrame; +} + +void StackFrame::clear_StackFrameType() { + switch(StackFrameType_case()) { + case kData: { + delete StackFrameType_.data_; + break; + } + case kRef: { + // No need to clear + break; + } + case STACKFRAMETYPE_NOT_SET: { + break; + } + } + _oneof_case_[0] = STACKFRAMETYPE_NOT_SET; +} + + +void StackFrame::Clear() { + clear_StackFrameType(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool StackFrame::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:mozilla.devtools.protobuf.StackFrame) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional .mozilla.devtools.protobuf.StackFrame.Data data = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_data())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_ref; + break; + } + + // optional uint64 ref = 2; + case 2: { + if (tag == 16) { + parse_ref: + clear_StackFrameType(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &StackFrameType_.ref_))); + set_has_ref(); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:mozilla.devtools.protobuf.StackFrame) + return true; +failure: + // @@protoc_insertion_point(parse_failure:mozilla.devtools.protobuf.StackFrame) + return false; +#undef DO_ +} + +void StackFrame::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:mozilla.devtools.protobuf.StackFrame) + // optional .mozilla.devtools.protobuf.StackFrame.Data data = 1; + if (has_data()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->data(), output); + } + + // optional uint64 ref = 2; + if (has_ref()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->ref(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:mozilla.devtools.protobuf.StackFrame) +} + +::google::protobuf::uint8* StackFrame::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.devtools.protobuf.StackFrame) + // optional .mozilla.devtools.protobuf.StackFrame.Data data = 1; + if (has_data()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->data(), target); + } + + // optional uint64 ref = 2; + if (has_ref()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(2, this->ref(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.devtools.protobuf.StackFrame) + return target; +} + +int StackFrame::ByteSize() const { + int total_size = 0; + + switch (StackFrameType_case()) { + // optional .mozilla.devtools.protobuf.StackFrame.Data data = 1; + case kData: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->data()); + break; + } + // optional uint64 ref = 2; + case kRef: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->ref()); + break; + } + case STACKFRAMETYPE_NOT_SET: { + break; + } + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void StackFrame::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const StackFrame* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void StackFrame::MergeFrom(const StackFrame& from) { + GOOGLE_CHECK_NE(&from, this); + switch (from.StackFrameType_case()) { + case kData: { + mutable_data()->::mozilla::devtools::protobuf::StackFrame_Data::MergeFrom(from.data()); + break; + } + case kRef: { + set_ref(from.ref()); + break; + } + case STACKFRAMETYPE_NOT_SET: { + break; + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void StackFrame::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void StackFrame::CopyFrom(const StackFrame& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool StackFrame::IsInitialized() const { + + return true; +} + +void StackFrame::Swap(StackFrame* other) { + if (other != this) { + std::swap(StackFrameType_, other->StackFrameType_); + std::swap(_oneof_case_[0], other->_oneof_case_[0]); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata StackFrame::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = StackFrame_descriptor_; + metadata.reflection = StackFrame_reflection_; + return metadata; +} + + // =================================================================== #ifndef _MSC_VER @@ -381,6 +1275,7 @@ const int Node::kIdFieldNumber; const int Node::kTypeNameFieldNumber; const int Node::kSizeFieldNumber; const int Node::kEdgesFieldNumber; +const int Node::kAllocationStackFieldNumber; #endif // !_MSC_VER Node::Node() @@ -390,6 +1285,7 @@ Node::Node() } void Node::InitAsDefaultInstance() { + allocationstack_ = const_cast< ::mozilla::devtools::protobuf::StackFrame*>(&::mozilla::devtools::protobuf::StackFrame::default_instance()); } Node::Node(const Node& from) @@ -405,6 +1301,7 @@ void Node::SharedCtor() { id_ = GOOGLE_ULONGLONG(0); typename__ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); size_ = GOOGLE_ULONGLONG(0); + allocationstack_ = NULL; ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -418,6 +1315,7 @@ void Node::SharedDtor() { delete typename__; } if (this != default_instance_) { + delete allocationstack_; } } @@ -443,7 +1341,7 @@ Node* Node::New() const { } void Node::Clear() { - if (_has_bits_[0 / 32] & 7) { + if (_has_bits_[0 / 32] & 23) { id_ = GOOGLE_ULONGLONG(0); if (has_typename_()) { if (typename__ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { @@ -451,6 +1349,9 @@ void Node::Clear() { } } size_ = GOOGLE_ULONGLONG(0); + if (has_allocationstack()) { + if (allocationstack_ != NULL) allocationstack_->::mozilla::devtools::protobuf::StackFrame::Clear(); + } } edges_.Clear(); ::memset(_has_bits_, 0, sizeof(_has_bits_)); @@ -519,6 +1420,19 @@ bool Node::MergePartialFromCodedStream( goto handle_unusual; } if (input->ExpectTag(34)) goto parse_edges; + if (input->ExpectTag(42)) goto parse_allocationStack; + break; + } + + // optional .mozilla.devtools.protobuf.StackFrame allocationStack = 5; + case 5: { + if (tag == 42) { + parse_allocationStack: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_allocationstack())); + } else { + goto handle_unusual; + } if (input->ExpectAtEnd()) goto success; break; } @@ -570,6 +1484,12 @@ void Node::SerializeWithCachedSizes( 4, this->edges(i), output); } + // optional .mozilla.devtools.protobuf.StackFrame allocationStack = 5; + if (has_allocationstack()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, this->allocationstack(), output); + } + if (!unknown_fields().empty()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); @@ -604,6 +1524,13 @@ void Node::SerializeWithCachedSizes( 4, this->edges(i), target); } + // optional .mozilla.devtools.protobuf.StackFrame allocationStack = 5; + if (has_allocationstack()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 5, this->allocationstack(), target); + } + if (!unknown_fields().empty()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); @@ -637,6 +1564,13 @@ int Node::ByteSize() const { this->size()); } + // optional .mozilla.devtools.protobuf.StackFrame allocationStack = 5; + if (has_allocationstack()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->allocationstack()); + } + } // repeated .mozilla.devtools.protobuf.Edge edges = 4; total_size += 1 * this->edges_size(); @@ -682,6 +1616,9 @@ void Node::MergeFrom(const Node& from) { if (from.has_size()) { set_size(from.size()); } + if (from.has_allocationstack()) { + mutable_allocationstack()->::mozilla::devtools::protobuf::StackFrame::MergeFrom(from.allocationstack()); + } } mutable_unknown_fields()->MergeFrom(from.unknown_fields()); } @@ -709,6 +1646,7 @@ void Node::Swap(Node* other) { std::swap(typename__, other->typename__); std::swap(size_, other->size_); edges_.Swap(&other->edges_); + std::swap(allocationstack_, other->allocationstack_); std::swap(_has_bits_[0], other->_has_bits_[0]); _unknown_fields_.Swap(&other->_unknown_fields_); std::swap(_cached_size_, other->_cached_size_); diff --git a/toolkit/devtools/server/CoreDump.pb.h b/toolkit/devtools/server/CoreDump.pb.h index 401e520cc13d..b894a5985d97 100644 --- a/toolkit/devtools/server/CoreDump.pb.h +++ b/toolkit/devtools/server/CoreDump.pb.h @@ -36,6 +36,8 @@ void protobuf_AssignDesc_CoreDump_2eproto(); void protobuf_ShutdownFile_CoreDump_2eproto(); class Metadata; +class StackFrame; +class StackFrame_Data; class Node; class Edge; @@ -120,6 +122,273 @@ class Metadata : public ::google::protobuf::Message { }; // ------------------------------------------------------------------- +class StackFrame_Data : public ::google::protobuf::Message { + public: + StackFrame_Data(); + virtual ~StackFrame_Data(); + + StackFrame_Data(const StackFrame_Data& from); + + inline StackFrame_Data& operator=(const StackFrame_Data& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const StackFrame_Data& default_instance(); + + void Swap(StackFrame_Data* other); + + // implements Message ---------------------------------------------- + + StackFrame_Data* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const StackFrame_Data& from); + void MergeFrom(const StackFrame_Data& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional uint64 id = 1; + inline bool has_id() const; + inline void clear_id(); + static const int kIdFieldNumber = 1; + inline ::google::protobuf::uint64 id() const; + inline void set_id(::google::protobuf::uint64 value); + + // optional .mozilla.devtools.protobuf.StackFrame parent = 2; + inline bool has_parent() const; + inline void clear_parent(); + static const int kParentFieldNumber = 2; + inline const ::mozilla::devtools::protobuf::StackFrame& parent() const; + inline ::mozilla::devtools::protobuf::StackFrame* mutable_parent(); + inline ::mozilla::devtools::protobuf::StackFrame* release_parent(); + inline void set_allocated_parent(::mozilla::devtools::protobuf::StackFrame* parent); + + // optional uint32 line = 3; + inline bool has_line() const; + inline void clear_line(); + static const int kLineFieldNumber = 3; + inline ::google::protobuf::uint32 line() const; + inline void set_line(::google::protobuf::uint32 value); + + // optional uint32 column = 4; + inline bool has_column() const; + inline void clear_column(); + static const int kColumnFieldNumber = 4; + inline ::google::protobuf::uint32 column() const; + inline void set_column(::google::protobuf::uint32 value); + + // optional bytes source = 5; + inline bool has_source() const; + inline void clear_source(); + static const int kSourceFieldNumber = 5; + inline const ::std::string& source() const; + inline void set_source(const ::std::string& value); + inline void set_source(const char* value); + inline void set_source(const void* value, size_t size); + inline ::std::string* mutable_source(); + inline ::std::string* release_source(); + inline void set_allocated_source(::std::string* source); + + // optional bytes functionDisplayName = 6; + inline bool has_functiondisplayname() const; + inline void clear_functiondisplayname(); + static const int kFunctionDisplayNameFieldNumber = 6; + inline const ::std::string& functiondisplayname() const; + inline void set_functiondisplayname(const ::std::string& value); + inline void set_functiondisplayname(const char* value); + inline void set_functiondisplayname(const void* value, size_t size); + inline ::std::string* mutable_functiondisplayname(); + inline ::std::string* release_functiondisplayname(); + inline void set_allocated_functiondisplayname(::std::string* functiondisplayname); + + // optional bool isSystem = 7; + inline bool has_issystem() const; + inline void clear_issystem(); + static const int kIsSystemFieldNumber = 7; + inline bool issystem() const; + inline void set_issystem(bool value); + + // optional bool isSelfHosted = 8; + inline bool has_isselfhosted() const; + inline void clear_isselfhosted(); + static const int kIsSelfHostedFieldNumber = 8; + inline bool isselfhosted() const; + inline void set_isselfhosted(bool value); + + // @@protoc_insertion_point(class_scope:mozilla.devtools.protobuf.StackFrame.Data) + private: + inline void set_has_id(); + inline void clear_has_id(); + inline void set_has_parent(); + inline void clear_has_parent(); + inline void set_has_line(); + inline void clear_has_line(); + inline void set_has_column(); + inline void clear_has_column(); + inline void set_has_source(); + inline void clear_has_source(); + inline void set_has_functiondisplayname(); + inline void clear_has_functiondisplayname(); + inline void set_has_issystem(); + inline void clear_has_issystem(); + inline void set_has_isselfhosted(); + inline void clear_has_isselfhosted(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::uint64 id_; + ::mozilla::devtools::protobuf::StackFrame* parent_; + ::google::protobuf::uint32 line_; + ::google::protobuf::uint32 column_; + ::std::string* source_; + ::std::string* functiondisplayname_; + bool issystem_; + bool isselfhosted_; + friend void protobuf_AddDesc_CoreDump_2eproto(); + friend void protobuf_AssignDesc_CoreDump_2eproto(); + friend void protobuf_ShutdownFile_CoreDump_2eproto(); + + void InitAsDefaultInstance(); + static StackFrame_Data* default_instance_; +}; +// ------------------------------------------------------------------- + +class StackFrame : public ::google::protobuf::Message { + public: + StackFrame(); + virtual ~StackFrame(); + + StackFrame(const StackFrame& from); + + inline StackFrame& operator=(const StackFrame& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const StackFrame& default_instance(); + + enum StackFrameTypeCase { + kData = 1, + kRef = 2, + STACKFRAMETYPE_NOT_SET = 0, + }; + + void Swap(StackFrame* other); + + // implements Message ---------------------------------------------- + + StackFrame* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const StackFrame& from); + void MergeFrom(const StackFrame& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef StackFrame_Data Data; + + // accessors ------------------------------------------------------- + + // optional .mozilla.devtools.protobuf.StackFrame.Data data = 1; + inline bool has_data() const; + inline void clear_data(); + static const int kDataFieldNumber = 1; + inline const ::mozilla::devtools::protobuf::StackFrame_Data& data() const; + inline ::mozilla::devtools::protobuf::StackFrame_Data* mutable_data(); + inline ::mozilla::devtools::protobuf::StackFrame_Data* release_data(); + inline void set_allocated_data(::mozilla::devtools::protobuf::StackFrame_Data* data); + + // optional uint64 ref = 2; + inline bool has_ref() const; + inline void clear_ref(); + static const int kRefFieldNumber = 2; + inline ::google::protobuf::uint64 ref() const; + inline void set_ref(::google::protobuf::uint64 value); + + inline StackFrameTypeCase StackFrameType_case() const; + // @@protoc_insertion_point(class_scope:mozilla.devtools.protobuf.StackFrame) + private: + inline void set_has_data(); + inline void set_has_ref(); + + inline bool has_StackFrameType(); + void clear_StackFrameType(); + inline void clear_has_StackFrameType(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + union StackFrameTypeUnion { + ::mozilla::devtools::protobuf::StackFrame_Data* data_; + ::google::protobuf::uint64 ref_; + } StackFrameType_; + ::google::protobuf::uint32 _oneof_case_[1]; + + friend void protobuf_AddDesc_CoreDump_2eproto(); + friend void protobuf_AssignDesc_CoreDump_2eproto(); + friend void protobuf_ShutdownFile_CoreDump_2eproto(); + + void InitAsDefaultInstance(); + static StackFrame* default_instance_; +}; +// ------------------------------------------------------------------- + class Node : public ::google::protobuf::Message { public: Node(); @@ -211,6 +480,15 @@ class Node : public ::google::protobuf::Message { inline ::google::protobuf::RepeatedPtrField< ::mozilla::devtools::protobuf::Edge >* mutable_edges(); + // optional .mozilla.devtools.protobuf.StackFrame allocationStack = 5; + inline bool has_allocationstack() const; + inline void clear_allocationstack(); + static const int kAllocationStackFieldNumber = 5; + inline const ::mozilla::devtools::protobuf::StackFrame& allocationstack() const; + inline ::mozilla::devtools::protobuf::StackFrame* mutable_allocationstack(); + inline ::mozilla::devtools::protobuf::StackFrame* release_allocationstack(); + inline void set_allocated_allocationstack(::mozilla::devtools::protobuf::StackFrame* allocationstack); + // @@protoc_insertion_point(class_scope:mozilla.devtools.protobuf.Node) private: inline void set_has_id(); @@ -219,6 +497,8 @@ class Node : public ::google::protobuf::Message { inline void clear_has_typename_(); inline void set_has_size(); inline void clear_has_size(); + inline void set_has_allocationstack(); + inline void clear_has_allocationstack(); ::google::protobuf::UnknownFieldSet _unknown_fields_; @@ -228,6 +508,7 @@ class Node : public ::google::protobuf::Message { ::std::string* typename__; ::google::protobuf::uint64 size_; ::google::protobuf::RepeatedPtrField< ::mozilla::devtools::protobuf::Edge > edges_; + ::mozilla::devtools::protobuf::StackFrame* allocationstack_; friend void protobuf_AddDesc_CoreDump_2eproto(); friend void protobuf_AssignDesc_CoreDump_2eproto(); friend void protobuf_ShutdownFile_CoreDump_2eproto(); @@ -362,6 +643,406 @@ inline void Metadata::set_timestamp(::google::protobuf::uint64 value) { // ------------------------------------------------------------------- +// StackFrame_Data + +// optional uint64 id = 1; +inline bool StackFrame_Data::has_id() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void StackFrame_Data::set_has_id() { + _has_bits_[0] |= 0x00000001u; +} +inline void StackFrame_Data::clear_has_id() { + _has_bits_[0] &= ~0x00000001u; +} +inline void StackFrame_Data::clear_id() { + id_ = GOOGLE_ULONGLONG(0); + clear_has_id(); +} +inline ::google::protobuf::uint64 StackFrame_Data::id() const { + // @@protoc_insertion_point(field_get:mozilla.devtools.protobuf.StackFrame.Data.id) + return id_; +} +inline void StackFrame_Data::set_id(::google::protobuf::uint64 value) { + set_has_id(); + id_ = value; + // @@protoc_insertion_point(field_set:mozilla.devtools.protobuf.StackFrame.Data.id) +} + +// optional .mozilla.devtools.protobuf.StackFrame parent = 2; +inline bool StackFrame_Data::has_parent() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void StackFrame_Data::set_has_parent() { + _has_bits_[0] |= 0x00000002u; +} +inline void StackFrame_Data::clear_has_parent() { + _has_bits_[0] &= ~0x00000002u; +} +inline void StackFrame_Data::clear_parent() { + if (parent_ != NULL) parent_->::mozilla::devtools::protobuf::StackFrame::Clear(); + clear_has_parent(); +} +inline const ::mozilla::devtools::protobuf::StackFrame& StackFrame_Data::parent() const { + // @@protoc_insertion_point(field_get:mozilla.devtools.protobuf.StackFrame.Data.parent) + return parent_ != NULL ? *parent_ : *default_instance_->parent_; +} +inline ::mozilla::devtools::protobuf::StackFrame* StackFrame_Data::mutable_parent() { + set_has_parent(); + if (parent_ == NULL) parent_ = new ::mozilla::devtools::protobuf::StackFrame; + // @@protoc_insertion_point(field_mutable:mozilla.devtools.protobuf.StackFrame.Data.parent) + return parent_; +} +inline ::mozilla::devtools::protobuf::StackFrame* StackFrame_Data::release_parent() { + clear_has_parent(); + ::mozilla::devtools::protobuf::StackFrame* temp = parent_; + parent_ = NULL; + return temp; +} +inline void StackFrame_Data::set_allocated_parent(::mozilla::devtools::protobuf::StackFrame* parent) { + delete parent_; + parent_ = parent; + if (parent) { + set_has_parent(); + } else { + clear_has_parent(); + } + // @@protoc_insertion_point(field_set_allocated:mozilla.devtools.protobuf.StackFrame.Data.parent) +} + +// optional uint32 line = 3; +inline bool StackFrame_Data::has_line() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void StackFrame_Data::set_has_line() { + _has_bits_[0] |= 0x00000004u; +} +inline void StackFrame_Data::clear_has_line() { + _has_bits_[0] &= ~0x00000004u; +} +inline void StackFrame_Data::clear_line() { + line_ = 0u; + clear_has_line(); +} +inline ::google::protobuf::uint32 StackFrame_Data::line() const { + // @@protoc_insertion_point(field_get:mozilla.devtools.protobuf.StackFrame.Data.line) + return line_; +} +inline void StackFrame_Data::set_line(::google::protobuf::uint32 value) { + set_has_line(); + line_ = value; + // @@protoc_insertion_point(field_set:mozilla.devtools.protobuf.StackFrame.Data.line) +} + +// optional uint32 column = 4; +inline bool StackFrame_Data::has_column() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void StackFrame_Data::set_has_column() { + _has_bits_[0] |= 0x00000008u; +} +inline void StackFrame_Data::clear_has_column() { + _has_bits_[0] &= ~0x00000008u; +} +inline void StackFrame_Data::clear_column() { + column_ = 0u; + clear_has_column(); +} +inline ::google::protobuf::uint32 StackFrame_Data::column() const { + // @@protoc_insertion_point(field_get:mozilla.devtools.protobuf.StackFrame.Data.column) + return column_; +} +inline void StackFrame_Data::set_column(::google::protobuf::uint32 value) { + set_has_column(); + column_ = value; + // @@protoc_insertion_point(field_set:mozilla.devtools.protobuf.StackFrame.Data.column) +} + +// optional bytes source = 5; +inline bool StackFrame_Data::has_source() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +inline void StackFrame_Data::set_has_source() { + _has_bits_[0] |= 0x00000010u; +} +inline void StackFrame_Data::clear_has_source() { + _has_bits_[0] &= ~0x00000010u; +} +inline void StackFrame_Data::clear_source() { + if (source_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + source_->clear(); + } + clear_has_source(); +} +inline const ::std::string& StackFrame_Data::source() const { + // @@protoc_insertion_point(field_get:mozilla.devtools.protobuf.StackFrame.Data.source) + return *source_; +} +inline void StackFrame_Data::set_source(const ::std::string& value) { + set_has_source(); + if (source_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + source_ = new ::std::string; + } + source_->assign(value); + // @@protoc_insertion_point(field_set:mozilla.devtools.protobuf.StackFrame.Data.source) +} +inline void StackFrame_Data::set_source(const char* value) { + set_has_source(); + if (source_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + source_ = new ::std::string; + } + source_->assign(value); + // @@protoc_insertion_point(field_set_char:mozilla.devtools.protobuf.StackFrame.Data.source) +} +inline void StackFrame_Data::set_source(const void* value, size_t size) { + set_has_source(); + if (source_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + source_ = new ::std::string; + } + source_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:mozilla.devtools.protobuf.StackFrame.Data.source) +} +inline ::std::string* StackFrame_Data::mutable_source() { + set_has_source(); + if (source_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + source_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:mozilla.devtools.protobuf.StackFrame.Data.source) + return source_; +} +inline ::std::string* StackFrame_Data::release_source() { + clear_has_source(); + if (source_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + return NULL; + } else { + ::std::string* temp = source_; + source_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } +} +inline void StackFrame_Data::set_allocated_source(::std::string* source) { + if (source_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + delete source_; + } + if (source) { + set_has_source(); + source_ = source; + } else { + clear_has_source(); + source_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:mozilla.devtools.protobuf.StackFrame.Data.source) +} + +// optional bytes functionDisplayName = 6; +inline bool StackFrame_Data::has_functiondisplayname() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +inline void StackFrame_Data::set_has_functiondisplayname() { + _has_bits_[0] |= 0x00000020u; +} +inline void StackFrame_Data::clear_has_functiondisplayname() { + _has_bits_[0] &= ~0x00000020u; +} +inline void StackFrame_Data::clear_functiondisplayname() { + if (functiondisplayname_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + functiondisplayname_->clear(); + } + clear_has_functiondisplayname(); +} +inline const ::std::string& StackFrame_Data::functiondisplayname() const { + // @@protoc_insertion_point(field_get:mozilla.devtools.protobuf.StackFrame.Data.functionDisplayName) + return *functiondisplayname_; +} +inline void StackFrame_Data::set_functiondisplayname(const ::std::string& value) { + set_has_functiondisplayname(); + if (functiondisplayname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + functiondisplayname_ = new ::std::string; + } + functiondisplayname_->assign(value); + // @@protoc_insertion_point(field_set:mozilla.devtools.protobuf.StackFrame.Data.functionDisplayName) +} +inline void StackFrame_Data::set_functiondisplayname(const char* value) { + set_has_functiondisplayname(); + if (functiondisplayname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + functiondisplayname_ = new ::std::string; + } + functiondisplayname_->assign(value); + // @@protoc_insertion_point(field_set_char:mozilla.devtools.protobuf.StackFrame.Data.functionDisplayName) +} +inline void StackFrame_Data::set_functiondisplayname(const void* value, size_t size) { + set_has_functiondisplayname(); + if (functiondisplayname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + functiondisplayname_ = new ::std::string; + } + functiondisplayname_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:mozilla.devtools.protobuf.StackFrame.Data.functionDisplayName) +} +inline ::std::string* StackFrame_Data::mutable_functiondisplayname() { + set_has_functiondisplayname(); + if (functiondisplayname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + functiondisplayname_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:mozilla.devtools.protobuf.StackFrame.Data.functionDisplayName) + return functiondisplayname_; +} +inline ::std::string* StackFrame_Data::release_functiondisplayname() { + clear_has_functiondisplayname(); + if (functiondisplayname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + return NULL; + } else { + ::std::string* temp = functiondisplayname_; + functiondisplayname_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } +} +inline void StackFrame_Data::set_allocated_functiondisplayname(::std::string* functiondisplayname) { + if (functiondisplayname_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + delete functiondisplayname_; + } + if (functiondisplayname) { + set_has_functiondisplayname(); + functiondisplayname_ = functiondisplayname; + } else { + clear_has_functiondisplayname(); + functiondisplayname_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:mozilla.devtools.protobuf.StackFrame.Data.functionDisplayName) +} + +// optional bool isSystem = 7; +inline bool StackFrame_Data::has_issystem() const { + return (_has_bits_[0] & 0x00000040u) != 0; +} +inline void StackFrame_Data::set_has_issystem() { + _has_bits_[0] |= 0x00000040u; +} +inline void StackFrame_Data::clear_has_issystem() { + _has_bits_[0] &= ~0x00000040u; +} +inline void StackFrame_Data::clear_issystem() { + issystem_ = false; + clear_has_issystem(); +} +inline bool StackFrame_Data::issystem() const { + // @@protoc_insertion_point(field_get:mozilla.devtools.protobuf.StackFrame.Data.isSystem) + return issystem_; +} +inline void StackFrame_Data::set_issystem(bool value) { + set_has_issystem(); + issystem_ = value; + // @@protoc_insertion_point(field_set:mozilla.devtools.protobuf.StackFrame.Data.isSystem) +} + +// optional bool isSelfHosted = 8; +inline bool StackFrame_Data::has_isselfhosted() const { + return (_has_bits_[0] & 0x00000080u) != 0; +} +inline void StackFrame_Data::set_has_isselfhosted() { + _has_bits_[0] |= 0x00000080u; +} +inline void StackFrame_Data::clear_has_isselfhosted() { + _has_bits_[0] &= ~0x00000080u; +} +inline void StackFrame_Data::clear_isselfhosted() { + isselfhosted_ = false; + clear_has_isselfhosted(); +} +inline bool StackFrame_Data::isselfhosted() const { + // @@protoc_insertion_point(field_get:mozilla.devtools.protobuf.StackFrame.Data.isSelfHosted) + return isselfhosted_; +} +inline void StackFrame_Data::set_isselfhosted(bool value) { + set_has_isselfhosted(); + isselfhosted_ = value; + // @@protoc_insertion_point(field_set:mozilla.devtools.protobuf.StackFrame.Data.isSelfHosted) +} + +// ------------------------------------------------------------------- + +// StackFrame + +// optional .mozilla.devtools.protobuf.StackFrame.Data data = 1; +inline bool StackFrame::has_data() const { + return StackFrameType_case() == kData; +} +inline void StackFrame::set_has_data() { + _oneof_case_[0] = kData; +} +inline void StackFrame::clear_data() { + if (has_data()) { + delete StackFrameType_.data_; + clear_has_StackFrameType(); + } +} +inline const ::mozilla::devtools::protobuf::StackFrame_Data& StackFrame::data() const { + return has_data() ? *StackFrameType_.data_ + : ::mozilla::devtools::protobuf::StackFrame_Data::default_instance(); +} +inline ::mozilla::devtools::protobuf::StackFrame_Data* StackFrame::mutable_data() { + if (!has_data()) { + clear_StackFrameType(); + set_has_data(); + StackFrameType_.data_ = new ::mozilla::devtools::protobuf::StackFrame_Data; + } + return StackFrameType_.data_; +} +inline ::mozilla::devtools::protobuf::StackFrame_Data* StackFrame::release_data() { + if (has_data()) { + clear_has_StackFrameType(); + ::mozilla::devtools::protobuf::StackFrame_Data* temp = StackFrameType_.data_; + StackFrameType_.data_ = NULL; + return temp; + } else { + return NULL; + } +} +inline void StackFrame::set_allocated_data(::mozilla::devtools::protobuf::StackFrame_Data* data) { + clear_StackFrameType(); + if (data) { + set_has_data(); + StackFrameType_.data_ = data; + } +} + +// optional uint64 ref = 2; +inline bool StackFrame::has_ref() const { + return StackFrameType_case() == kRef; +} +inline void StackFrame::set_has_ref() { + _oneof_case_[0] = kRef; +} +inline void StackFrame::clear_ref() { + if (has_ref()) { + StackFrameType_.ref_ = GOOGLE_ULONGLONG(0); + clear_has_StackFrameType(); + } +} +inline ::google::protobuf::uint64 StackFrame::ref() const { + if (has_ref()) { + return StackFrameType_.ref_; + } + return GOOGLE_ULONGLONG(0); +} +inline void StackFrame::set_ref(::google::protobuf::uint64 value) { + if (!has_ref()) { + clear_StackFrameType(); + set_has_ref(); + } + StackFrameType_.ref_ = value; +} + +inline bool StackFrame::has_StackFrameType() { + return StackFrameType_case() != STACKFRAMETYPE_NOT_SET; +} +inline void StackFrame::clear_has_StackFrameType() { + _oneof_case_[0] = STACKFRAMETYPE_NOT_SET; +} +inline StackFrame::StackFrameTypeCase StackFrame::StackFrameType_case() const { + return StackFrame::StackFrameTypeCase(_oneof_case_[0]); +} +// ------------------------------------------------------------------- + // Node // optional uint64 id = 1; @@ -518,6 +1199,47 @@ Node::mutable_edges() { return &edges_; } +// optional .mozilla.devtools.protobuf.StackFrame allocationStack = 5; +inline bool Node::has_allocationstack() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +inline void Node::set_has_allocationstack() { + _has_bits_[0] |= 0x00000010u; +} +inline void Node::clear_has_allocationstack() { + _has_bits_[0] &= ~0x00000010u; +} +inline void Node::clear_allocationstack() { + if (allocationstack_ != NULL) allocationstack_->::mozilla::devtools::protobuf::StackFrame::Clear(); + clear_has_allocationstack(); +} +inline const ::mozilla::devtools::protobuf::StackFrame& Node::allocationstack() const { + // @@protoc_insertion_point(field_get:mozilla.devtools.protobuf.Node.allocationStack) + return allocationstack_ != NULL ? *allocationstack_ : *default_instance_->allocationstack_; +} +inline ::mozilla::devtools::protobuf::StackFrame* Node::mutable_allocationstack() { + set_has_allocationstack(); + if (allocationstack_ == NULL) allocationstack_ = new ::mozilla::devtools::protobuf::StackFrame; + // @@protoc_insertion_point(field_mutable:mozilla.devtools.protobuf.Node.allocationStack) + return allocationstack_; +} +inline ::mozilla::devtools::protobuf::StackFrame* Node::release_allocationstack() { + clear_has_allocationstack(); + ::mozilla::devtools::protobuf::StackFrame* temp = allocationstack_; + allocationstack_ = NULL; + return temp; +} +inline void Node::set_allocated_allocationstack(::mozilla::devtools::protobuf::StackFrame* allocationstack) { + delete allocationstack_; + allocationstack_ = allocationstack; + if (allocationstack) { + set_has_allocationstack(); + } else { + clear_has_allocationstack(); + } + // @@protoc_insertion_point(field_set_allocated:mozilla.devtools.protobuf.Node.allocationStack) +} + // ------------------------------------------------------------------- // Edge @@ -634,8 +1356,8 @@ namespace google { namespace protobuf { -} // namespace protobuf -} // namespace google +} // namespace google +} // namespace protobuf #endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/toolkit/devtools/server/CoreDump.proto b/toolkit/devtools/server/CoreDump.proto index 2424cc7248ed..b58a1406aca2 100644 --- a/toolkit/devtools/server/CoreDump.proto +++ b/toolkit/devtools/server/CoreDump.proto @@ -52,13 +52,40 @@ message Metadata { optional uint64 timeStamp = 1; } +// A serialized version of `JS::ubi::StackFrame`. Older parent frame tails are +// de-duplicated to cut down on [de]serialization and size costs. +message StackFrame { + oneof StackFrameType { + // This is the first time this stack frame has been serialized, and so + // here is all of its data. + Data data = 1; + // A reference to a stack frame that has already been serialized and has + // the given number as its id. + uint64 ref = 2; + } + + message Data { + optional uint64 id = 1; + optional StackFrame parent = 2; + optional uint32 line = 3; + optional uint32 column = 4; + // char16_t[] + optional bytes source = 5; + // char16_t[] + optional bytes functionDisplayName = 6; + optional bool isSystem = 7; + optional bool isSelfHosted = 8; + } +} + // A serialized version of `JS::ubi::Node` and its outgoing edges. message Node { - optional uint64 id = 1; + optional uint64 id = 1; // char16_t[] - optional bytes typeName = 2; - optional uint64 size = 3; - repeated Edge edges = 4; + optional bytes typeName = 2; + optional uint64 size = 3; + repeated Edge edges = 4; + optional StackFrame allocationStack = 5; } // A serialized edge from the heap graph.