LTTng-core (basic tracing infrastructure) 0.5.108
In-Reply-To: <[email protected]>
Quoted 2 lines · Ingo Molnar
yeah - and i dont think the kprobes overhead is a fundamental thing - i posted a few kprobes-speedup patches as a reply to your measurements.
Where is the source code for the kprobes benchmarks you used?
Signature · 1 line
Chuck
Chuck,
i cannot email you because the mail always bounces ...
the kprobes benchmark is a simple "NOP" function:
static int counter = 0;
static int probe_pre_handler (struct kprobe * kp,
struct pt_regs * regs)
{
counter++;
return 0;}
i've attached it.
Ingo
Quoted 11 lines · Chuck Ebbert
In-Reply-To: <[email protected]>
Quoted 2 lines · Ingo Molnar
yeah - and i dont think the kprobes overhead is a fundamental thing - i posted a few kprobes-speedup patches as a reply to your measurements.
Where is the source code for the kprobes benchmarks you used?
Signature · 1 line
Chuck
/*
* no-op kprobe handler
* Copyright (c) 2005 Hitachi,Ltd.,
* Created by Masami Hiramatsu<[email protected]> */
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/kprobes.h>
MODULE_AUTHOR("M.Hiramatsu");MODULE_LICENSE("GPL");
static unsigned long addr = 0;module_param(addr, ulong, 0444);
static struct kprobe kp;
static int counter=0;
static int probe_pre_handler (struct kprobe * kp,
struct pt_regs * regs)
{
counter++;
return 0;
}static int install_probe(void)
{
int ret = -10000;
if (addr) {
kp.pre_handler = probe_pre_handler;
kp.addr = (void *)addr;
printk("probe install to %p\n", (void*)addr);
ret = register_kprobe(&kp);
}
if (ret) {
printk("probe install error: %d\n",ret);
}
return ret;
}static void uninstall_probe(void)
{
if (kp.addr) {
printk("uninstall from %p\n", (void*)kp.addr);
unregister_kprobe(&kp);
}
printk("count:%d\n",counter);
}module_init(install_probe);module_exit(uninstall_probe);