cc: introduce helpers to access pt_regs in an arch-independent manner

Convert some of the examples and tools to use the new helpers.

Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
diff --git a/tools/funclatency.py b/tools/funclatency.py
index 1968c94..f5618e0 100755
--- a/tools/funclatency.py
+++ b/tools/funclatency.py
@@ -132,7 +132,7 @@
         'BPF_HISTOGRAM(dist, ip_key_t);')
     # stash the IP on entry, as on return it's kretprobe_trampoline:
     bpf_text = bpf_text.replace('ENTRYSTORE',
-        'u64 ip = ctx->ip; ipaddr.update(&pid, &ip);')
+        'u64 ip = PT_REGS_IP(ctx); ipaddr.update(&pid, &ip);')
     bpf_text = bpf_text.replace('STORE',
         'u64 ip, *ipp = ipaddr.lookup(&pid); if (ipp) { ip = *ipp; ' +
         'dist.increment((ip_key_t){ip, bpf_log2l(delta)}); ' +