fche changed the topic of #systemtap to: http://sourceware.org/systemtap; email systemtap@sourceware.org if answers here not timely, conversations may be logged
khaled has quit [Quit: Konversation terminated!]
Amy1 has quit [Ping timeout: 246 seconds]
derek has joined #systemtap
derek is now known as Guest74946
hpt has joined #systemtap
Guest74946 has quit [Ping timeout: 240 seconds]
sscox has quit [Ping timeout: 252 seconds]
derek has joined #systemtap
sscox has joined #systemtap
derek is now known as Guest23417
<Guest23417> Hi Can I access local variable by name ?
<Guest23417> e.g. in vfs_open() there is local variable struct dentry *dentry = d_real(path->dentry, NULL, file->f_flags, 0);, Can want access this local variable by name, instead of using $$locals
sscox has quit [Ping timeout: 246 seconds]
Guest23417 has quit [Ping timeout: 240 seconds]
sscox has joined #systemtap
<fche> $dentry
orivej has joined #systemtap
hpt has quit [Ping timeout: 256 seconds]
hpt has joined #systemtap
hpt has quit [Remote host closed the connection]
hpt has joined #systemtap
jhg_ has quit [Ping timeout: 272 seconds]
jhg_ has joined #systemtap
hpt has quit [Ping timeout: 256 seconds]
hpt has joined #systemtap
khaled has joined #systemtap
irker769 has quit [Quit: transmission timeout]
lindi- has joined #systemtap
mjw has joined #systemtap
hpt has quit [Quit: Lost terminal]
hpt has joined #systemtap
hpt has quit [Ping timeout: 264 seconds]
tromey has joined #systemtap
sapatel has joined #systemtap
amerey has joined #systemtap
yogananth has quit [Quit: Leaving]
Amy1 has joined #systemtap
khaled has quit [Quit: Konversation terminated!]
khaled has joined #systemtap
tromey has quit [Remote host closed the connection]
ema has quit [Ping timeout: 256 seconds]
ema has joined #systemtap
khaled has quit [Quit: Konversation terminated!]
khaled has joined #systemtap
tromey has joined #systemtap
khaled has quit [Remote host closed the connection]
khaled has joined #systemtap
khaled has quit [Remote host closed the connection]
khaled has joined #systemtap
darvon has quit [Ping timeout: 245 seconds]
darvon has joined #systemtap
orivej has quit [Ping timeout: 265 seconds]
<irker474> systemtap: smakarov systemtap.git:master * release-4.2-64-g4f9715d3b / buildrun.cxx: PR25485: also disable -Wno-{pointer<->int}-cast for kernel modules :p
irker474 has joined #systemtap
tromey has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
mjw has quit [Quit: Leaving]
khaled has quit [Remote host closed the connection]
khaled has joined #systemtap
Derek has joined #systemtap
Derek is now known as Guest97310
amerey has quit [Quit: Leaving]
<agentzh> fche: what do you think of this patch? https://gist.github.com/agentzh/a465564e2c41f1353de46690eeb4f4cf
<agentzh> the kernel func snprintf would output hashed pointer values which obscure the userland pointers.
<agentzh> and recent kernels even obscure NULL pointers as well, even more confusing.
<agentzh> i already spent several hours on this...
<agentzh> wasted actually :)
<fche> ugh
<fche> yeah you know that makes sense
<fche> we can divorce from the kernel's %p hiding games in the few places we use the kernel's snprintf
<agentzh> okay, cool, will commit.
<agentzh> another quick question, will vmalloc() evict pages from the page cache/buffer when the free memory is not enough?
<fche> I believe it depends on the flags we pass
<agentzh> just wondering if we should reserve enough truly free pages for stap modules.
<fche> a little bit of resource freeing on our behalf should be fine
<agentzh> how about stap's own _stp_vzalloc()?
<fche> git grep :)
<agentzh> seems like vmalloc() does not take any flags. under the hood, it seems like GFP_KERNEL being passed.
<agentzh> return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL);
<fche> ok
<agentzh> __vmalloc in turn calls kmalloc().
<agentzh> with some special flags.
sapatel has quit [Ping timeout: 256 seconds]
<Guest97310> HI I using symname to get symbol name from address, but it desn't work, if the address is from a module, how can I let systemtap also look at the module symbol?
<fche> Guest97310, stap -d modulename or stap --all-modules
<Guest97310> Thanks!
<Guest97310> some header file is not in kernel header, such as fs/proc/internal.h,
<Guest97310> struct proc_inode { +0 struct pid *pid; +8 unsigned int fd; +16 union proc_op op; +24 struct proc_dir_entry *pde; +32 struct ctl_table_header *sysctl; +40 struct ctl_table *sysctl_entry; +48 struct hlist_node sysctl_inodes; +64 struct proc_ns_operations *ns_ops; +72 struct inode
<Guest97310> vfs_inode;};
<Guest97310> I need to manually adjust the offset, like this
<Guest97310> function get_proc_dir_entry:long (file:long) %{ /* pure */ long addr = (long)file_inode((void*)STAP_ARG_file); long pde = kread((unsigned long *)(addr - 72 + 24)); long ops = kread((unsigned long *)(pde + 40)); STAP_RETURN(ops); CATCH_DEREF_FAULT();%}
<Guest97310> I manually calcuate the offset by using dwarfdump or gdb.
<fche> eww
<fche> couldn't make @cast() work ?
<agentzh> stap can do dwarf magic for you :)
<Guest97310> OH, I haven't tried cast yet, I thought cast only works for those header file in linux header, let me try it now
<fche> if the data type can be fished out of the dwarf debuginfo, no header file needed
<Guest97310> That's great
<Guest97310> how can I use @cast do some work like C code container_of does?
<Guest97310> convert a pointer from member to it container, which need subtract some offset from original pointer?
<fche> we have a macro that computes the equivalent pointer arithmetic
<fche> called @container_of :-)
<Guest97310> Thanks!!!