diff options
author | hiramatu <hiramatu> | 2007-08-20 18:25:14 +0000 |
---|---|---|
committer | hiramatu <hiramatu> | 2007-08-20 18:25:14 +0000 |
commit | 478831cf1792ed2f4d48dbe65558e55f61a9c62b (patch) | |
tree | 3e7743f7ef0998c5c317955039778742469f00be | |
parent | 8c711d30367365fa6a036e468eba4401d26131a3 (diff) | |
download | systemtap-steved-478831cf1792ed2f4d48dbe65558e55f61a9c62b.tar.gz systemtap-steved-478831cf1792ed2f4d48dbe65558e55f61a9c62b.tar.xz systemtap-steved-478831cf1792ed2f4d48dbe65558e55f61a9c62b.zip |
2007-08-20 Masami Hiramatsu <mhiramat@redhat.com>
* ioblock.stp: Fix __bio_ino() not to access i_ino if the page is not
assigned to any inode.
* stack-x86_64.c: Fix backtrace to use the value of stack register
instead of its address.
-rw-r--r-- | runtime/ChangeLog | 5 | ||||
-rw-r--r-- | runtime/stack-x86_64.c | 2 | ||||
-rw-r--r-- | tapset/ChangeLog | 5 | ||||
-rw-r--r-- | tapset/ioblock.stp | 17 |
4 files changed, 22 insertions, 7 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog index aa2d8fc2..e745a2dd 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,8 @@ +2007-08-20 Masami Hiramatsu <mhiramat@redhat.com> + + * stack-x86_64.c: Fix backtrace to use the value of stack register + instead of its address. + 2007-08-17 Martin Hunt <hunt@redhat.com> * bench2/bench.rb: Send HUP to stapio, instead of staprun. diff --git a/runtime/stack-x86_64.c b/runtime/stack-x86_64.c index 6f02e7ba..16e3bf7c 100644 --- a/runtime/stack-x86_64.c +++ b/runtime/stack-x86_64.c @@ -10,7 +10,7 @@ static void __stp_stack_print (struct pt_regs *regs, int verbose, int levels) { - unsigned long *stack = (unsigned long *)®_SP(regs); + unsigned long *stack = (unsigned long *)REG_SP(regs); unsigned long addr; while ((long)stack & (THREAD_SIZE-1)) { diff --git a/tapset/ChangeLog b/tapset/ChangeLog index 3cc08a71..d889b197 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,8 @@ +2007-08-20 Masami Hiramatsu <mhiramat@redhat.com> + + * ioblock.stp: Fix __bio_ino() not to access i_ino if the page is not + assigned to any inode. + 2007-08-20 Wenji Huang <wenji.huang@oracle.com> * nfs.stp (nfs.fop.aio_read, nfs.fop.aio_write): Modify evaluating count. diff --git a/tapset/ioblock.stp b/tapset/ioblock.stp index 761818fc..d2efd525 100644 --- a/tapset/ioblock.stp +++ b/tapset/ioblock.stp @@ -17,12 +17,17 @@ function __bio_ino:long(bio:long) %{ struct bio *bio = (struct bio *)(long)THIS->bio; struct page *bv_page = bio? kread(&(bio->bi_io_vec[0].bv_page)) : NULL; - struct address_space *mapping = bv_page? kread(&(bv_page->mapping)) : NULL; - struct inode *host = mapping? kread(&(mapping->host)) : NULL; - if (host == NULL) - THIS->__retvalue = -1; - else - THIS->__retvalue = kread(&(host->i_ino)); + struct address_space *mapping; + struct inode *host; + THIS->__retvalue = -1; + if (bv_page && !PageSlab(bv_page) && !PageSwapCache(bv_page)) { + mapping = kread(&(bv_page->mapping)); + if (mapping && ((unsigned long)mapping & PAGE_MAPPING_ANON) == 0) { + host = kread(&(mapping->host)); + if (host) + THIS->__retvalue = kread(&(host->i_ino)); + } + } CATCH_DEREF_FAULT(); %} |