TraceOptions.h revision 341825
1//===-- TraceOptions.h ------------------------------------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10#ifndef liblldb_TraceOptions_h_ 11#define liblldb_TraceOptions_h_ 12 13#include "lldb/lldb-defines.h" 14#include "lldb/lldb-enumerations.h" 15 16#include "lldb/Utility/StructuredData.h" 17 18namespace lldb_private { 19class TraceOptions { 20public: 21 TraceOptions() : m_trace_params(new StructuredData::Dictionary()) {} 22 23 const StructuredData::DictionarySP &getTraceParams() const { 24 return m_trace_params; 25 } 26 27 lldb::TraceType getType() const { return m_type; } 28 29 uint64_t getTraceBufferSize() const { return m_trace_buffer_size; } 30 31 uint64_t getMetaDataBufferSize() const { return m_meta_data_buffer_size; } 32 33 void setTraceParams(const StructuredData::DictionarySP &dict_obj) { 34 m_trace_params = dict_obj; 35 } 36 37 void setType(lldb::TraceType type) { m_type = type; } 38 39 void setTraceBufferSize(uint64_t size) { m_trace_buffer_size = size; } 40 41 void setMetaDataBufferSize(uint64_t size) { m_meta_data_buffer_size = size; } 42 43 void setThreadID(lldb::tid_t thread_id) { m_thread_id = thread_id; } 44 45 lldb::tid_t getThreadID() const { return m_thread_id; } 46 47private: 48 lldb::TraceType m_type; 49 uint64_t m_trace_buffer_size; 50 uint64_t m_meta_data_buffer_size; 51 lldb::tid_t m_thread_id; 52 53 /// m_trace_params is meant to hold any custom parameters 54 /// apart from meta buffer size and trace size. 55 /// The interpretation of such parameters is left to 56 /// the lldb-server. 57 StructuredData::DictionarySP m_trace_params; 58}; 59} 60 61#endif // liblldb_TraceOptions_h_ 62