fche changed the topic of #systemtap to: http://sourceware.org/systemtap; email systemtap@sourceware.org if answers here not timely, conversations may be logged
efiop_ has quit [Quit: Leaving]
efiop has quit [Quit: Leaving]
hpt has joined #systemtap
sanoj has joined #systemtap
hkshaw has joined #systemtap
Humble has joined #systemtap
ravi has joined #systemtap
hkshaw has quit [Quit: Leaving.]
hkshaw has joined #systemtap
nkambo_ has quit [Ping timeout: 240 seconds]
nkambo has joined #systemtap
pwithnall____ has joined #systemtap
sona has joined #systemtap
<sona> are there any built in sorting functions ?
lorddoskias has left #systemtap [#systemtap]
mjw has joined #systemtap
hpt has quit [Quit: Lost terminal]
<sona> fche, is there any buit in function to sort associative arrays on the basis of keys, rather than their values
hkshaw1 has joined #systemtap
hkshaw has quit [Ping timeout: 240 seconds]
<fche> sona, you can iterate based on sorted keys:
<fche> foo[4]="hi" foo[3]="lo" foreach (x+ in foo) { prrintln(x) } will print 3 4
<sona> fche, here keys are pointers
<sona> so the above apporach is not working
<fche> the approach would sort based upon pointer value
<fche> you want sorting based on dereferenced pointer value?
<sona> yes
<fche> can you have an auxiliary lookup table that stores the dereferenced values ?
<sona> as far as the approach is optimal, i can use anything
hkshaw1 has quit [Quit: Leaving.]
hkshaw has joined #systemtap
ravi has quit [Quit: Leaving]
hkshaw has quit [Quit: Leaving.]
<sona> fche, can you tell me stap sorts internally using +/-. Maybe then i could figure out why its not working to sort pointers
<fche> It is sorting pointers
<fche> But it cannot sort on some -function- of a pointer value, such as its kernel_int($ptr) e.g.
<fche> it will sort on whatever number or string key you identify in the foreach() statement
<sona> fche, can you please tell why this is not working in this script : https://pastebin.com/7tzQEnH2
hkshaw has joined #systemtap
<fche> you didn't say what wasn't working, but I suspect it's the 't' variable on line 17
<fche> ie you 're not getting back the string you stored in the array
<fche> try foreach (t = [p-,q] in traces_ref) { }
<fche> in order to fetch traces_ref[p,q] automagically
<fche> into the t variable
<sona> fche, after sorting , when i am printing pointers , its showing 0 everytime for all pointers, so i wonder if it really sorts them or not
<fche> can you pastebin a sample run ?
<fche> and stap -V ?
<sona> fche, sure
wcohen has quit [Remote host closed the connection]
<sona> fche, its the output https://pastebin.com/CrhYrmMK
<sona> for the same script
nkambo has quit [Ping timeout: 264 seconds]
drsmith_away is now known as drsmith
<fche> that's quite strange
<fche> oh actually not so strange
<fche> on line 17 of your script, you print 'ptr,i,t' where you're iterating over p,q
<sona> fche, omg, silly mistake :(
<fche> but I don't see why you're seeing any 't' values at all in the last print
<fche> like t should be an uninitialized empty string in that context
<fche> could you share your stap -V ?
<fche> (initialized empty string I mean)
<fche> do you have a 'global t' somewhere in your script ?
<sona> fche, yep , i declared
<fche> ok so then it's not the same script
<sona> fche, oh yep,i deaclared later
<fche> did stap warn you about the not-written-to variable ptr on linme 17 ?
<sona> fche, version :Systemtap translator/driver (version 3.1/0.168, rpm 3.1-1.fc24)
<sona> tested kernel versions: 2.6.18 ... 4.10-rc8
<sona> enabled features: AVAHI BOOST_STRING_REF DYNINST JAVA PYTHON2 PYTHON3 LIBRPM LIBSQLITE3 LIBVIRT LIBXML2 NLS NSS READLINE
<sona> This is free software; see the source for copying conditions.
<sona> Copyright (C) 2005-2017 Red Hat, Inc. and others
<sona> fche, nope
<sona> it didn't i think
<fche> ok, it should have
<sona> fche, ran again the same, it is giving warning
<sona> fche, i didnt realized those warnings
<sona> fche, tysm for looking into
<fche> np, glad things are actually working :)
<fche> you shouldn't use global FOO unless you need those variables to survive a probe, so no 'global i, global t'
<fche> would've probably helped you catch the problems earlier
<sona> fche, yep
hpt has joined #systemtap
wcohen has joined #systemtap
hpt has quit [Ping timeout: 240 seconds]
tromey has joined #systemtap
lindi- has quit [Ping timeout: 260 seconds]
sanoj has quit [Ping timeout: 240 seconds]
pwithnall___ has joined #systemtap
pwithnall____ has quit [Ping timeout: 255 seconds]
brolley has joined #systemtap
rth has joined #systemtap
sona has quit [Ping timeout: 240 seconds]
lindi- has joined #systemtap
lindi- has joined #systemtap
lindi- has quit [Changing host]
sjas_ has joined #systemtap
sjas has quit [Ping timeout: 252 seconds]
orivej has quit [Ping timeout: 255 seconds]
orivej has joined #systemtap
bendlas has quit [Remote host closed the connection]
bendlas has joined #systemtap
mjw has quit [Quit: Leaving]
nkambo has joined #systemtap
sona has joined #systemtap
pwithnall___ has quit [Quit: pwithnall___]
hkshaw has quit [Ping timeout: 246 seconds]
csanting has quit [Ping timeout: 268 seconds]
irker688 has joined #systemtap
<irker688> systemtap: dsmith systemtap.git:refs/heads/rth/bpf * release-3.1-66-g696a4ac / systemtap.spec: Add support for the httpd code to systemtap.spec, defaulting to "off". http://tinyurl.com/n3mtkjb
<irker688> systemtap: dsmith systemtap.git:refs/heads/rth/bpf * release-3.1-67-g90f2c8d / systemtap.spec: Fix my typo in systemtap.spec. http://tinyurl.com/lvwrxoo
<irker688> systemtap: rth systemtap.git:refs/heads/rth/bpf * release-3.1-68-g3414d59 / : Revert all bpf patches http://tinyurl.com/kqbya7k
<irker688> systemtap: rth systemtap.git:refs/heads/rth/bpf * release-3.1-69-g0dbac95 / : Revert "Revert all bpf patches" http://tinyurl.com/me36dt8
csanting has joined #systemtap
ppetraki has quit [Ping timeout: 240 seconds]
sona has quit [Ping timeout: 240 seconds]
ppetraki has joined #systemtap
ppetraki has quit [Read error: Connection reset by peer]
mjw has joined #systemtap
<irker688> systemtap: rth systemtap.git:refs/heads/rth/bpf * release-3.1-70-g2566869 / translate.cxx: Always limit the scope of deref_fault label http://tinyurl.com/l7xvgwk
csanting has quit [Read error: Connection reset by peer]
csanting has joined #systemtap
ppetraki has joined #systemtap
gmg has joined #systemtap
<irker688> systemtap: csanting systemtap.git:refs/heads/csanting/PR20883 * release-3.1-69-gf463543 / main.cxx remote.cxx remote.h: Initial k8s commit http://tinyurl.com/ms34p58
drsmith is now known as drsmith_away
wcohen has quit [Ping timeout: 272 seconds]
tromey has quit [Quit: ERC (IRC client for Emacs 26.0.50)]
mjw has quit [Quit: Leaving]
brolley has left #systemtap [#systemtap]
pwithnall__ has joined #systemtap
wcohen has joined #systemtap
pwithnall__ has quit [Ping timeout: 272 seconds]
irker688 has quit [Quit: transmission timeout]