I am trying to profile with VTune a simple python script.
import numpy as np
def my_function():
res = 0
for i in range(100000000):
res = res + i
final_res = np.log(res)
return final_res
def my_function2():
res = 0
for i in range(200000000):
res = res + i
final_res = np.log(res)
return final_res
print(my_function())
print(my_function2())
My goal is to find out cpu/time wastefull functions. That's why I choose hotspots analysis.
However there are plenty of "cannot locate debugging information" warnings:
Cannot locate file `'.
Cannot locate file `'.
Cannot locate debugging information for file `/home/chris/venv/lib/python3.8/site-packages/numpy/random/mtrand.cpython-38-x86_64-linux-gnu.so'.
Cannot locate debugging information for file `/home/chris/venv/lib/python3.8/site-packages/numpy/random/bit_generator.cpython-38-x86_64-linux-gnu.so'.
Cannot locate debugging information for file `/home/chris/venv/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-x86_64-linux-gnu.so'.
Cannot locate debugging information for file `/home/chris/venv/lib/python3.8/site-packages/numpy.libs/libopenblas64_p-r0-15028c96.3.21.so'.
Cannot locate debugging information for file `/opt/intel/oneapi/vtune/2023.2.0/lib64/libtpsstool.so'.
and results are not valid and not stable every time I run program (on screenshot seems clearly that my_function2 and my function1 are not the only 2 functions with most of the time)false_results I am pretty new to Vtune. Can you help me fix these warnings and have better more accurate results? I am working with VM Box with Ubuntu 22.04, (default python 3.10) but I use python3.8.10.