1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef TRACE_DATA_CACHE_BASE_H 17 #define TRACE_DATA_CACHE_BASE_H 18 19 #include <array> 20 #include <deque> 21 #include <map> 22 #include <stdexcept> 23 #include <string> 24 #include <vector> 25 #include "trace_stdtype.h" 26 namespace SysTuning { 27 namespace TraceStreamer { 28 using namespace TraceStdtype; 29 class TraceDataCacheBase { 30 public: 31 TraceDataCacheBase() = default; 32 TraceDataCacheBase(const TraceDataCacheBase&) = delete; 33 TraceDataCacheBase& operator=(const TraceDataCacheBase&) = delete; 34 virtual ~TraceDataCacheBase() = default; 35 36 public: 37 GpuCounter gpuCounter_; 38 GpuCounterObject gpuCounterObject_; 39 SliceObject sliceObject_; 40 SliceData sliceData_; 41 MetaData metaData_; 42 uint64_t traceStartTime_ = std::numeric_limits<uint64_t>::max(); 43 uint64_t traceEndTime_ = 0; 44 }; 45 } // namespace TraceStreamer 46 } // namespace SysTuning 47 48 #endif // TRACE_DATA_CACHE_BASE_H 49