1

我使用以下 cmake 选项构建了opencv :

cmake  -G "Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_TBB=OFF -DWITH_OPENMP=ON -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc -DCMAKE_CXX_FLAGS="-debug inline-debug-info -parallel-source-info=2 -ipo -parallel -xCORE-AVX2 -Bdynamic" ..

但是,当我尝试构建(使用icpc)使用 opencv(使用构建)的应用程序时,会icpc出现以下警告消息:

icpc -shared-intel -L/home/luca/ParallelOpenCV/originalOpenCV/lib -parallel -o "SURFAllInOne"  ./main.o ./surf.o   -lopencv_core -lopencv_xfeatures2d -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs
ipo: warning #11021: unresolved gzeof
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_core.so
ipo: warning #11021: unresolved gzrewind
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_core.so
ipo: warning #11021: unresolved gzopen
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_core.so
ipo: warning #11021: unresolved gzclose
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_core.so
ipo: warning #11021: unresolved gzgets
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_core.so
ipo: warning #11021: unresolved gzputs
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_core.so
ipo: warning #11021: unresolved _ZNK2cv9Feature2D14descriptorSizeEv
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_xfeatures2d.so
ipo: warning #11021: unresolved _ZN2cv9Feature2D4readERKNS_8FileNodeE
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_xfeatures2d.so
ipo: warning #11021: unresolved _ZNK2cv9Feature2D14descriptorTypeEv
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_xfeatures2d.so
ipo: warning #11021: unresolved _ZN2cv9Feature2D7computeERKNS_11_InputArrayERSt6vectorINS_8KeyPointESaIS5_EERKNS_12_OutputArrayE
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_xfeatures2d.so
ipo: warning #11021: unresolved _ZTTN2cv9Feature2DE
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_xfeatures2d.so
ipo: warning #11021: unresolved _ZN2cv15KeyPointsFilter16runByImageBorderERSt6vectorINS_8KeyPointESaIS2_EENS_5Size_IiEEi
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_xfeatures2d.so
ipo: warning #11021: unresolved _ZN2cv15KeyPointsFilter10retainBestERSt6vectorINS_8KeyPointESaIS2_EEi
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_xfeatures2d.so
ipo: warning #11021: unresolved _ZN2cv9Feature2DD2Ev
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_xfeatures2d.so
ipo: warning #11021: unresolved _ZN2cv9Feature2D16detectAndComputeERKNS_11_InputArrayES3_RSt6vectorINS_8KeyPointESaIS5_EERKNS_12_OutputArrayEb
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_xfeatures2d.so
ipo: warning #11021: unresolved _ZN2cv15KeyPointsFilter16removeDuplicatedERSt6vectorINS_8KeyPointESaIS2_EE
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_xfeatures2d.so
ipo: warning #11021: unresolved _ZN2cv9Feature2D6detectERKNS_11_InputArrayERSt6vectorINS_8KeyPointESaIS5_EES3_
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_xfeatures2d.so
ipo: warning #11021: unresolved _ZN2cv9Feature2D6detectERKNS_11_InputArrayERSt6vectorIS4_INS_8KeyPointESaIS5_EESaIS7_EES3_
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_xfeatures2d.so
ipo: warning #11021: unresolved _ZTIN2cv9Feature2DE
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_xfeatures2d.so
ipo: warning #11021: unresolved _ZN2cv9Feature2D7computeERKNS_11_InputArrayERSt6vectorIS4_INS_8KeyPointESaIS5_EESaIS7_EERKNS_12_OutputArrayE
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_xfeatures2d.so
ipo: warning #11021: unresolved _ZNK2cv9Feature2D5emptyEv
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_xfeatures2d.so
ipo: warning #11021: unresolved _ZNK2cv9Feature2D11defaultNormEv
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_xfeatures2d.so
ipo: warning #11021: unresolved _ZNK2cv9Feature2D5writeERNS_11FileStorageE
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_xfeatures2d.so
ipo: warning #11021: unresolved _ZN2cv15KeyPointsFilter15runByPixelsMaskERSt6vectorINS_8KeyPointESaIS2_EERKNS_3MatE
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_xfeatures2d.so
ipo: warning #11021: unresolved gtk_file_chooser_set_do_overwrite_confirmation
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_mutex_lock
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_main_iteration
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_window_resize
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_get_current_time
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_file_chooser_set_current_name
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_type_check_instance_cast
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_widget_destroy
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_window_fullscreen
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_mutex_unlock
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_box_pack_end
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_widget_get_colormap
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_cond_broadcast
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_box_pack_start
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gdk_cairo_set_source_pixbuf
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_signal_connect_data
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_widget_add_events
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_window_set_title
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved cairo_paint
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_free
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_dialog_run
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gdk_window_move_resize
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_range_set_range
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_source_remove
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_range_get_type
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_main_iteration_do
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_cond_new
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_init
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_file_chooser_add_filter
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_range_set_value
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_window_get_title
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_cond_timed_wait
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_file_filter_new
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_thread_yield
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_return_if_fail_warning
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_window_set_geometry_hints
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_window_set_resizable
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_widget_queue_resize
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_widget_get_events
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_file_chooser_set_filter
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_label_new
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_dialog_get_type
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_file_filter_add_pattern
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_time_val_add
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_object_get_type
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_box_get_type
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gdk_window_set_user_data
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_window_move
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_widget_new
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_file_chooser_get_type
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_container_get_type
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_type_class_peek
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_widget_get_visual
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_file_chooser_get_filename
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_type_register_static_simple
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_scale_set_draw_value
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_widget_get_window
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_vbox_new
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_range_get_value
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gdk_cairo_create
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_style_set_background
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_type_check_class_cast
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_thread_new
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_timeout_add
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_file_filter_set_name
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gdk_window_new
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_hbox_new
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_object_unref
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_type_check_instance_is_a
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_events_pending
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_window_new
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_scale_get_type
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_window_unfullscreen
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_usleep
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_widget_queue_draw
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_thread_self
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_widget_show
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_file_chooser_dialog_new
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_widget_get_realized
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_hscale_new_with_range
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_container_add
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_cond_wait
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved cairo_destroy
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gdk_pixbuf_new_from_data
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_scale_set_digits
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_window_get_type
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_widget_get_type
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_style_attach
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved g_mutex_new
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved gtk_widget_set_realized
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_highgui.so
ipo: warning #11021: unresolved deflateParams
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_imgcodecs.so
ipo: warning #11021: unresolved inflate
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_imgcodecs.so
ipo: warning #11021: unresolved deflateReset
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_imgcodecs.so
ipo: warning #11021: unresolved inflateInit_
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_imgcodecs.so
ipo: warning #11021: unresolved deflateInit_
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_imgcodecs.so
ipo: warning #11021: unresolved inflateReset
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_imgcodecs.so
ipo: warning #11021: unresolved deflate
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_imgcodecs.so
ipo: warning #11021: unresolved uncompress
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_imgcodecs.so
ipo: warning #11021: unresolved deflateEnd
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_imgcodecs.so
ipo: warning #11021: unresolved compress
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_imgcodecs.so
ipo: warning #11021: unresolved inflateSync
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_imgcodecs.so
ipo: warning #11021: unresolved inflateEnd
        Referenced in /home/luca/ParallelOpenCV/originalOpenCV/lib/libopencv_imgcodecs.so

这是什么意思?代码是正确的,但我想知道我是否应该为此烦恼(特别是如果这会使代码变慢,我会在这里讨论)

4

1 回答 1

1

-ipo当您将它与(程序间优化)标志一起使用时,这似乎在英特尔编译器中长期以来一直是一个问题。这是一个已知问题。当您使用的库也与其他库一起构建时,问题就会浮出水面。但是我们在构建应用程序时并没有明确列出这些其他库。事实上,你不必这样做。但是程序间分析无法找出这些其他库,因此分析失败导致没有产生与 -ipo 相关的任何优化。因此,可能/可实现的性能下降。

解决方法是使用-l.

例如,假设我的应用程序需要一个库 A ( liba) 并liba使用库 B ( libb) 和 C ( libc) 编译。

通常在我们的应用程序的链接时,我们-lliba在命令中指定。但是使用 -ipo编译器选项这还不够。您还必须-llibb -llibc在编译命令中指定。

查找库: 您可以从您的 make 文件或警告消息开始,即您的警告消息列出以下库:libopencv_core.so, libopencv_xfeatures2d.so, libopencv_highgui.solibopencv_imgcodecs.so

然后对于每个库运行ldd libname 这将为您提供库引用的libname库列表。您必须为找到的所有库递归地运行此命令。您可以跳过系统库,例如“libc.so、linux-vdso.so”等...

例如,当我在 papi 库上尝试 ldd

ldd libpapi.so
    linux-vdso.so.1 (0x00007ffe7a799000)
    libpfm.so.4 => path to lib/libpfm.so.4 (0x00007fa2fd1c3000)
    libc.so.6 => /lib64/libc.so.6 (0x00007fa2fcd98000)
    /lib64/ld-linux-x86-64.so.2 (0x000056413361c000)

在这里,libpfm.so 是有趣的。其余的库是系统库。然后我们ldd在 libpfm.so 上运行

ldd libpfm.so
    linux-vdso.so.1 (0x00007ffc5df9d000)
    libc.so.6 => /lib64/libc.so.6 (0x00007faf97e74000)
    /lib64/ld-linux-x86-64.so.2 (0x0000561984fdb000)

这仅指系统库,因此我们可以在这里停止我们的算法。

最后是库列表:papi 和 pfm。

于 2017-04-19T19:58:56.207 回答