1 /* 2 * Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved. 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 #ifndef HIPERF_PERF_FILE_FORMAT_H 16 #define HIPERF_PERF_FILE_FORMAT_H 17 18 #include <string> 19 #include "utilities.h" 20 21 namespace OHOS { 22 namespace Developtools { 23 namespace NativeDaemon { 24 // ref struct 25 struct SymbolStruct { 26 uint64_t vaddr_ = 0; 27 uint32_t len_ = 0; 28 std::string symbolName_ = EMPTY_STRING; SymbolStructOHOS::Developtools::NativeDaemon::SymbolStruct29 SymbolStruct() {}; SymbolStructOHOS::Developtools::NativeDaemon::SymbolStruct30 SymbolStruct(uint64_t vaddr, uint32_t len, const std::string &symbolName) 31 : vaddr_(vaddr), len_(len), symbolName_(symbolName) 32 { 33 } 34 }; 35 36 struct SymbolFileStruct { 37 std::string filePath_ = EMPTY_STRING; 38 uint32_t symbolType_; 39 uint64_t textExecVaddr_; 40 uint64_t textExecVaddrFileOffset_; 41 std::string buildId_; 42 std::vector<SymbolStruct> symbolStructs_; 43 }; 44 } // namespace NativeDaemon 45 } // namespace Developtools 46 } // namespace OHOS 47 #endif