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: [patch] Alter syscall.brk and syscall.mremap to support IA64


Lai Jiangshan wrote:

Hi, all
    In the current tapset, kernel function sys_brk and sys_mremap are
used to probe syscall.brk and syscall.mremap. But on IA64, the entries
of syscall brk and mremap are actually ia64_brk and ia64_mremap, but not
sys_brk and sys_mremap. Though I think ia64's kernel function will be
finally changed to sys_brk and sys_mremap, it will be a long time so it
is inconvenient for users to probe these 2 syscalls on IA64. So I added
the probe points to syscall.brk and syscall.mremap for IA64 as following:

diff -Nur /usr/share/systemtap/tapset/syscalls.stp tapset/syscalls.stp
--- /usr/share/systemtap/tapset/syscalls.stp 2007-09-18 10:11:15.000000000 +0900
+++ tapset/syscalls.stp 2007-09-18 12:07:19.000000000 +0900
@@ -178,12 +178,14 @@


# brk ________________________________________________________
# unsigned long sys_brk(unsigned long brk)
-probe syscall.brk = kernel.function("sys_brk") {
+probe syscall.brk = kernel.function("sys_brk"),
+        kernel.function("ia64_brk") ? {
    name = "brk"
    brk = $brk
    argstr = sprintf("%p", brk)
}

sys_brk is generic, use %( arch == "ia64" %? to make it optional. Of course, it is better to put architecture depended probe into the corresponding directory.


Regards,
wenji


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