greenplumn CMiniDumperDXL 源码

  • 2022-08-18
  • 浏览 (116)

greenplumn CMiniDumperDXL 代码

文件路径:/src/backend/gporca/libgpopt/src/minidump/CMiniDumperDXL.cpp

//---------------------------------------------------------------------------
//	Greenplum Database
//	Copyright (C) 2011 EMC Corp.
//
//	@filename:
//		CMiniDumperDXL.cpp
//
//	@doc:
//		Implementation of DXL-specific minidump handler
//---------------------------------------------------------------------------

#include "gpopt/minidump/CMiniDumperDXL.h"

#include "gpos/base.h"
#include "gpos/string/CWStringBase.h"
#include "gpos/task/CTask.h"
#include "gpos/task/CWorker.h"

#include "naucrates/dxl/xml/CDXLSections.h"

using namespace gpos;
using namespace gpdxl;
using namespace gpopt;

// size of temporary buffer for expanding XML entry header
#define GPOPT_THREAD_HEADER_SIZE 128

//---------------------------------------------------------------------------
//	@function:
//		CMiniDumperDXL::CMiniDumperDXL
//
//	@doc:
//		Ctor
//
//---------------------------------------------------------------------------
CMiniDumperDXL::CMiniDumperDXL() : CMiniDumper()
{
}


//---------------------------------------------------------------------------
//	@function:
//		CMiniDumperDXL::~CMiniDumperDXL
//
//	@doc:
//		Dtor
//
//---------------------------------------------------------------------------
CMiniDumperDXL::~CMiniDumperDXL() = default;


//---------------------------------------------------------------------------
//	@function:
//		CMiniDumperDXL::SerializeHeader
//
//	@doc:
//		Serialize minidump header
//
//---------------------------------------------------------------------------
void
CMiniDumperDXL::SerializeHeader()
{
	*m_oos << CDXLSections::m_wszDocumentHeader;
}


//---------------------------------------------------------------------------
//	@function:
//		CMiniDumperDXL::SerializeFooter
//
//	@doc:
//		Serialize minidump footer
//
//---------------------------------------------------------------------------
void
CMiniDumperDXL::SerializeFooter()
{
	*m_oos << CDXLSections::m_wszDocumentFooter;
}


//---------------------------------------------------------------------------
//	@function:
//		CMiniDumperDXL::SerializeEntryHeader
//
//	@doc:
//		Serialize entry header
//
//---------------------------------------------------------------------------
void
CMiniDumperDXL::SerializeEntryHeader()
{
	WCHAR wszBuffer[GPOPT_THREAD_HEADER_SIZE];

	CWStringStatic str(wszBuffer, GPOS_ARRAY_SIZE(wszBuffer));
	str.AppendFormat(CDXLSections::m_wszThreadHeaderTemplate,
					 0	// thread id
	);

	*m_oos << str.GetBuffer();
}


//---------------------------------------------------------------------------
//	@function:
//		CMiniDumperDXL::SerializeEntryFooter
//
//	@doc:
//		Serialize entry footer
//
//---------------------------------------------------------------------------
void
CMiniDumperDXL::SerializeEntryFooter()
{
	*m_oos << CDXLSections::m_wszThreadFooter;
}

// EOF

相关信息

greenplumn 源码目录

相关文章

greenplumn CDXLMinidump 源码

greenplumn CMetadataAccessorFactory 源码

greenplumn CMinidumperUtils 源码

greenplumn CSerializableMDAccessor 源码

greenplumn CSerializableOptimizerConfig 源码

greenplumn CSerializablePlan 源码

greenplumn CSerializableQuery 源码

greenplumn CSerializableStackTrace 源码

0  赞