0
У меня есть эта основная программа OpenCV:профилирующего OpenCV с использованием OProfile
#include <iostream>
#include "opencv2/opencv.hpp"
int main(){
std::cout<<"Reading Image..."<<std::endl;
cv::Mat img = cv::imread("all_souls_000000.jpg", cv::IMREAD_GRAYSCALE);
if(!img.data)
std::cerr<<"Error reading image"<<std::endl;
return 0;
}
который создает исполняемый ReadImage
. Я хочу профилировать его с помощью OProfile. Тем не менее, работает:
operf ./ReadImage > ReadImage.log
Возвраты:
Kernel profiling is not possible with current system config.
Set /proc/sys/kernel/kptr_restrict to 0 to collect kernel samples.
operf: Profiler started
* * * * WARNING: Profiling rate was throttled back by the kernel * * * *
The number of samples actually recorded is less than expected, but is
probably still statistically valid. Decreasing the sampling rate is the
best option if you want to avoid throttling.
Profiling done.
Почему это происходит? Каков наилучший способ профилировать OpenCV?
Нет, мне нужно знать процент (и возможное время), потраченный на каждую вызванную функцию, поэтому я могу найти самые дорогие и попытаться распараллелить их – justHelloWorld