This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Hardware Breakpoint support for systemtap translator


Hi Roland,

Roland McGrath wrote:
1. probe kernel.data(ADDRESS).write {....} : To probe writes at the given address
2. probe kernel.data(ADDRESS).rw {....} : To probe read & write access to the given address.
3. probe kernel.data("SYMBOL").write {....}
4. probe kernel.data("SYMBOL").rw {....} : Similar to 1,2, but using a symbol name as argument.

That is a nice start! But what about dynamic uses? i.e.

	probe kernel.function("foobar")
	{
	  w1 = watch $foo->bar
	}

	probe kernel.function.return("foobar")
	{
	  unwatch w1
	}

	probe watch.w1
	{
	  val = $$watch.baz # i.e. $foo->bar.baz
	}

or probably some entirely different syntax.  But I think you get the idea:
enable/disable dynamically-discovered addresses to trigger watchpoint
probes of some sort.  I think it would be really nice if the watch probe
could somehow be embedded in the enabling probe's context so it can use
$bar there and have those address translations taken at enable-time.


Enabling systemtap to set hardware breakpoints at runtime would be a very useful feature to have, but it presents a problem. Kprobe handlers get executed in exception context, and it is not possible to register a hardware breakpoint from within exception context. I'm wondering how it could be implemented..


Also, what about specifying access-size for the watchpoint, on machines
where that can be done (i.e. x86)?

Thats a nice suggestion, I'll add this !



Thanks,
Roland
Thanks,

--
Prerna Saxena

Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]