1 //===-- TraceOptions.h ------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_TraceOptions_h_
11 #define liblldb_TraceOptions_h_
13 #include "lldb/lldb-defines.h"
14 #include "lldb/lldb-enumerations.h"
16 #include "lldb/Utility/StructuredData.h"
18 namespace lldb_private {
21 TraceOptions() : m_trace_params(new StructuredData::Dictionary()) {}
23 const StructuredData::DictionarySP &getTraceParams() const {
24 return m_trace_params;
27 lldb::TraceType getType() const { return m_type; }
29 uint64_t getTraceBufferSize() const { return m_trace_buffer_size; }
31 uint64_t getMetaDataBufferSize() const { return m_meta_data_buffer_size; }
33 void setTraceParams(const StructuredData::DictionarySP &dict_obj) {
34 m_trace_params = dict_obj;
37 void setType(lldb::TraceType type) { m_type = type; }
39 void setTraceBufferSize(uint64_t size) { m_trace_buffer_size = size; }
41 void setMetaDataBufferSize(uint64_t size) { m_meta_data_buffer_size = size; }
43 void setThreadID(lldb::tid_t thread_id) { m_thread_id = thread_id; }
45 lldb::tid_t getThreadID() const { return m_thread_id; }
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;
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
57 StructuredData::DictionarySP m_trace_params;
61 #endif // liblldb_TraceOptions_h_