I think that the instructions you are following are not yet included into the mainline Linux kernel. As a consequence, perf is telling you that the events are not supported: perf doesn't know the "toggle" mechanism mentioned on this page.
I can see two workarounds:
- If you have access to the source code you want to profile you can use the perf_event_open system call directly from your source code to start and stop counting on function entry and exit.
- Clone jolsa repository
git clone https://kernel.googlesource.com/pub/scm/linux/kernel/git/jolsa/perf
switch the core_toggle branchgit co remotes/origin/perf/core_toggle
and then compile and run the kernel with this support.
Regarding 2, I am not familiar at all with kernel versions and development and I think that this solution may be quie complex to use and maintain. Maybe you should ask on the perf users mailing list if there are any plans for the toggle feature to be integrated into the mainline kernel.