max sample rate optimization

Signed-off-by: yuyanqinghw <yuyanqing539@huawei.com>
This commit is contained in:
yuyanqinghw 2024-01-30 19:39:33 +08:00
parent 81e3301718
commit b41c71fed5

View File

@ -678,8 +678,7 @@ bool SubCommandRecord::SetPerfMaxSampleRate()
printf("read %s fail.\n", PERF_EVENT_MAX_SAMPLE_RATE.c_str());
return false;
}
if (maxRate > frequency)
{
if (maxRate > frequency) {
return true;
}
int newRate = frequency > PerfEvents::DEFAULT_EVENT_MAX_SAMPLE_RATE ? frequency :