if (!DumpSymbolForRecord(r, false)) {
return false;
}
+ if (fp_callchain_sampling_) {
+ if (!DumpSymbolForRecord(r, true)) {
+ return false;
+ }
+ }
}
} else if (record->type() == PERF_RECORD_LOST) {
lost_record_count_ += static_cast<LostRecord*>(record)->lost;
r.stack_user_data.data.clear();
r.stack_user_data.dyn_size = 0;
r.AdjustSizeBasedOnData();
- if (!DumpSymbolForRecord(r, true)) {
- return false;
+ if (dump_symbols_) {
+ if (!DumpSymbolForRecord(r, true)) {
+ return false;
+ }
}
}
}
ASSERT_TRUE(RunRecordCmd({"--dump-symbols"}, tmpfile.path));
CheckDsoSymbolRecords(tmpfile.path, true, &success);
ASSERT_TRUE(success);
+ if (IsDwarfCallChainSamplingSupported()) {
+ ASSERT_TRUE(RunRecordCmd({"-g"}, tmpfile.path));
+ bool success;
+ CheckDsoSymbolRecords(tmpfile.path, false, &success);
+ ASSERT_TRUE(success);
+ ASSERT_TRUE(RunRecordCmd({"-g", "--dump-symbols"}, tmpfile.path));
+ CheckDsoSymbolRecords(tmpfile.path, true, &success);
+ ASSERT_TRUE(success);
+ }
}
TEST(record_cmd, group_option) {