How to profile dpdk app with Valgrind

I have been working for couple of hours trying to profile my dpdk app using valgrind.  Found out pretty fast this isn’t an easy task.

App is running on RedHat 7.2 system.

RDRAND ERROR:

First attempt working with valgrind 3.10.0 provided the following error:

ERROR: This system does not support “RDRAND”.
Please check that RTE_MACHINE is set correctly.

After some digging – seems like dpdk should be recompiled with the following flag: CONFIG_RTE_MACHINE=”snb” – stackoverflow link

 

EAL issues:

WIth recompiled dpdk i reached to the EAL errors and other DPDK api issue, for example:

EAL: map_all_hugepages(): mmap failed: Invalid argument

Issue was resolved only after i understood valgrind 3.10.0 has a bug working with huge pages. Luckily, a bugfix was committed – cloned and compiled version 3.15 and it worked like a charm.

No worries valgrind compilation is very ease – go through README and you should be fine

Good luck.

Leave a Reply

Your email address will not be published. Required fields are marked *