Yocto already has some information on setting up and using OProfile and oprofileui. As this document doesn't cover everything in detail, it may be worth taking a look at the Yocto Project Development Manual
The OProfile manual can be found here: OProfile manual
The OProfile website contains links to the above manual and bunch of other items including an extensive set of examples: About OProfile