[英]Oprofile warning “could not check that the binary file”
我们使用Oprofile对内核模块进行性能分析,并且在报告中有如下警告
warning: could not check that the binary file /lib/modules/2.6.32-191.el6.x86_64/kernel/fs/ext4/ext4.ko has not been modified since the profile was taken. Results may be inaccurate.
1591 samples % symbol name
1592 1622 9.8381 ext4_iget
1593 1591 9.6500 ext4_find_entry
1594 1231 7.4665 __ext4_get_inode_loc
1595 783 4.7492 ext4_ext_get_blocks
1596 752 4.5612 ext4_check_dir_entry
1597 644 3.9061 ext4_mark_iloc_dirty
1598 583 3.5361 ext4_get_blocks
1599 583 3.5361 ext4_xattr_get
谁能解释这个警告是什么,它是否会影响oprofile输出的准确性,并且是否有避免该警告的方法?
任何建议表示赞赏。 非常感谢!
添加更多信息:在daemon/opd_mangling.c
if (!sf->kernel)
binary = find_cookie(sf->cookie);
else
binary = sf->kernel->name;
...
fill_header(odb_get_data(file), counter,
sf->anon ? sf->anon->start : 0, last_start,
!!sf->kernel, last ? !!last->kernel : 0,
spu_profile, sf->embedded_offset,
binary ? op_get_mtime(binary) : 0);
对于内核模块文件, sf->kernel->name
是内核模块名称,因此fill头将始终用0填充mtime
并生成不必要的警告
失败表明该文件的stat
信息失败。 执行strace -e stat
以查看特定的故障模式。
time_t op_get_mtime(char const * file)
{
struct stat st;
if (stat(file, &st))
return 0;
return st.st_mtime;
}
...
if (!header.mtime) {
// FIXME: header.mtime for JIT sample files is 0. The problem could be that
// in opd_mangling.c:opd_open_sample_file() the call of fill_header()
// think that the JIT sample file is not a binary file.
if (is_jit_sample(file)) {
cverb << vbfd << "warning: could not check that the binary file "
<< file << " has not been modified since "
"the profile was taken. Results may be inaccurate.\n";
是否会影响oprofile输出的准确性?是否有避免这种警告的方法?
是的,它会影响输出,因为它没有机会警告您“ the last modified time of the binary file does not match that of the sample file...
是否the last modified time of the binary file does not match that of the sample file...
”。 只要确定自己测量的结果与现在安装的二进制文件相匹配,您看到的警告就不会造成伤害。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.