调用PAPI_start_counters

时间:2018-05-02 11:03:36

标签: c profiling papi

我面临一个奇怪的问题,即程序在调用PAPI_start_counters函数时冻结。

例如,当我使用here中的代码并编译为" gcc -o papitest high_level.c -lpapi"并运行./papitest我得到输出: 该系统中有11个计数器  然后什么也没有。如果我尝试用 Ctrl + C 杀死程序,没有任何反应,kill -9也没有任何反应。我的系统如下:

操作系统:Debian GNU / Linux 8(jessie) 内核:Linux 3.16.0-5-amd64 架构:x86-64 32核Intel(R)Xeon(R)CPU E5-4603 v2 @ 2.20GHz

我记得过去在运行较旧内核的同一台服务器上使用PAPI。

编辑:这是运行dmesg时显示的内容:

[ 2039.025224] INFO: task papitest:2022 blocked for more than 120 seconds.
[ 2039.025284]       Tainted: G         C    3.16.0-5-amd64 #1
[ 2039.025335] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 2039.025421] papitest        D ffff88081daf0050     0  2022   2008 0x00000000
[ 2039.025427]  ffff88081fb180d0 0000000000000086 0000000000013b40 ffff88081e823fd8
[ 2039.025431]  0000000000013b40 ffff88081daf0050 ffff88103f4619f8 ffff88081e823de0
[ 2039.025435]  ffff88103f4619fc ffff88081daf0050 00000000ffffffff ffff88103f461a00
[ 2039.025439] Call Trace:
[ 2039.025447]  [<ffffffff815227c5>] ? schedule_preempt_disabled+0x25/0x70
[ 2039.025452]  [<ffffffff81524263>] ? __mutex_lock_slowpath+0xd3/0x1d0
[ 2039.025457]  [<ffffffff81133fc0>] ? remote_function+0x40/0x50
[ 2039.025461]  [<ffffffff8152437b>] ? mutex_lock+0x1b/0x2a
[ 2039.025466]  [<ffffffff81134800>] ? perf_event_read_value+0x30/0xd0
[ 2039.025470]  [<ffffffff811348cd>] ? __perf_read_group_add+0x2d/0x190
[ 2039.025475]  [<ffffffff81136e1a>] ? _perf_event_disable+0x5a/0xb0
[ 2039.025479]  [<ffffffff8113500f>] ? perf_read+0xbf/0x250
[ 2039.025483]  [<ffffffff811afca3>] ? vfs_read+0x93/0x170
[ 2039.025486]  [<ffffffff811b08d2>] ? SyS_read+0x42/0xa0
[ 2039.025492]  [<ffffffff81525c00>] ? system_call_fast_compare_end+0x10/0x15

0 个答案:

没有答案