Kprobes stress test prototype
Masami Hiramatsu
mhiramat@redhat.com
Fri Jun 26 18:30:00 GMT 2009
Hi,
Here is a script of kprobes stress test which uses
kprobes-ftrace engine. Currently, this doesn't use any
benchmarks for making a load.
Any updates, comments, and reports are welcome!
On KVM/x86-64, I've found some symbols must be marked
as __kprobes or blacklisted by using this script.
<always system hang up>
p irq_return
p start_critical_timing
p time_hardirqs_off
p bad_address
p trace_hardirqs_off_thunk
p restore
<not always, but potentially dangerous>
p start_critical_timings
p stop_critical_timing
p trace_hardirqs_on_thunk
p restore_norax
(I've encountered other odd memory corruptions too.
However, I couldn't identify the reason, it might be a bug
in kprobes or kvm.)
Basic usage is very simple.
Of course, this needs kprobes-ftrace engine patchset which
I posted to lkml (http://lkml.org/lkml/2009/6/1/461).
1. Make a working area and put the script;
$ mkdir stest/
$ cp kprobestest stest/
2. Run it.
$ cd stest/
$ ./kprobestest run
3. If kernel gets trouble, reboot it and run again.
$ cd stest/
$ ./kprobestest run
4. Repeat it, until all symbols are tested.
First, the test lists up all symbols in ".text" section, except
".text.kprobes"(*) and breaks it into sub-lists. Initially, each
sub-lists has 64 symbols and are stored into "gray" dir.
The test passes each sub-list to kprobes-ftrace engine and makes
a load(currently, just sleep 2secs).
If a sub-list hasn't made any trouble, it is moved to "white" dir.
If it causes a kernel panic etc., it is moved to "black" dir.
If "gray" dir becomes empty, it collects sub-lists in "black" dir
and breaks it into smaller sub-lists which has 16 symbols.
The test repeats it until each sub-list has just 1 symbol.
(*) You can also pass limited symbols which you are interested in
instead of all symbols. In the step 2,
$ cd stest/
$ ./kprobestest run SYMBOL_LIST_FILE
The SYMBOL_LIST_FILE must be written in the format of kprobes_events.
This means you have to add a "p " prefix for each symbol. So,
$ cat SYMBOL_LIST_FILE
p symbol1
p symbol2
...
Thank you,
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division
e-mail: mhiramat@redhat.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kprobestest
URL: <http://sourceware.org/pipermail/systemtap/attachments/20090626/f68b3859/attachment.ksh>
More information about the Systemtap
mailing list