mirror of
https://gitee.com/openharmony/developtools_hiperf
synced 2024-11-23 07:29:42 +00:00
add oaded func base vaddr in proto report file
Signed-off-by: zhangcui <zhangcui11@huawei.com>
This commit is contained in:
parent
cda897fb8a
commit
11e2e0bc5d
@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
// Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
@ -41,6 +41,9 @@ message CallStackSample {
|
||||
// index of SymbolTableFile::symbol_name, base from 0
|
||||
// -1 means not found
|
||||
optional int32 function_name_id = 3;
|
||||
|
||||
// loaded function base vaddr
|
||||
optional uint64 loaded_vaddr = 4;
|
||||
}
|
||||
|
||||
repeated CallStackFrame callStackFrame = 3;
|
||||
|
@ -126,7 +126,7 @@ bool ReportProtobufFileWriter::ProcessSampleRecord(
|
||||
for (const CallFrame &frame : recordSample.callFrames_) {
|
||||
auto callframe = sample->add_callstackframe();
|
||||
callframe->set_symbols_vaddr(frame.vaddrInFile_);
|
||||
|
||||
callframe->set_loaded_vaddr(frame.ip_ - frame.offsetToVaddr_);
|
||||
for (auto fileIt = symbolsFiles.begin(); fileIt != symbolsFiles.end(); fileIt++) {
|
||||
if (fileIt->get()->filePath_ == frame.filePath_) {
|
||||
callframe->set_symbols_file_id(fileIt - symbolsFiles.begin());
|
||||
|
Loading…
Reference in New Issue
Block a user