修改内存问题

Signed-off-by: yuanye <yuanye64@huawei.com>
This commit is contained in:
yuanye 2024-11-20 17:14:47 +08:00
parent f1d9f60fb6
commit f7714ccc87
2 changed files with 8 additions and 4 deletions

View File

@ -91,7 +91,7 @@ public:
{
return sizeof(header_);
};
void GetHeaderBinary(std::vector<uint8_t>& buf) const;
void GetHeaderBinary(std::vector<uint8_t> &buf) const;
uint32_t GetType() const
{
@ -245,9 +245,9 @@ public:
// extend
// hold the new ips memory (after unwind)
// used for data_.ips replace (ReplaceWithCallStack)
std::vector<u64> ips_;
std::vector<DfxFrame> callFrames_;
std::vector<pid_t> serverPidMap_;
static std::vector<u64> ips_;
static std::vector<DfxFrame> callFrames_;
static std::vector<pid_t> serverPidMap_;
PerfRecordSample() = default;
PerfRecordSample(const PerfRecordSample& sample);

4
src/perf_event_record.cpp Normal file → Executable file
View File

@ -169,6 +169,10 @@ void PerfEventRecord::DumpLog(const std::string &prefix) const
GetType(), GetMisc(), GetSize());
}
std::vector<u64> PerfRecordSample::ips_ = {};
std::vector<DfxFrame> PerfRecordSample::callFrames_ = {};
std::vector<pid_t> PerfRecordSample::serverPidMap_ = {};
PerfRecordAuxtrace::PerfRecordAuxtrace(u64 size, u64 offset, u64 reference, u32 idx, u32 tid, u32 cpu, u32 pid)
{
PerfEventRecord::Init(PERF_RECORD_AUXTRACE);