If you are using the standard linux-yocto kernel, perf_events is enabled already, so there is nothing more to do.
To build the perf tool, you can add it explicitly to the target image dependencies, or you can add the tools-profile feature, which also brings in gprof. As I mentioned previously, you will probably want debug symbols on the target image and also the kernel vmlinux image. In total, this is what you will need in conf/local.conf:
EXTRA_IMAGE_FEATURES = "debug-tweaks dbg-pkgs tools-profile" IMAGE_INSTALL_append = "kernel-vmlinux"