* [Bug tapsets/31740] New: @hist_log affects the result of @variance
@ 2024-05-15 7:10 lijunlong at openresty dot com
2024-05-15 18:49 ` [Bug tapsets/31740] " agentzh at gmail dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: lijunlong at openresty dot com @ 2024-05-15 7:10 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=31740
Bug ID: 31740
Summary: @hist_log affects the result of @variance
Product: systemtap
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: tapsets
Assignee: systemtap at sourceware dot org
Reporter: lijunlong at openresty dot com
Target Milestone: ---
Description:
I discovered that using `@hist_log` impacts the result of `@variance` in
SystemTap. Here's a minimal reproducer script:
``` test.stp
global stats;
probe oneshot {
stats["k0"] <<< 1;
stats["k0"] <<< 2;
stats["k0"] <<< 3;
foreach ([k] in stats) {
printf("variance = %d\n", @variance(stats[k], 7));
// print(@hist_log(stats[k]));
}
abort();
}
```
When I execute the script directly, the output shows `variance = 1`:
```
systemtap git:(master) ✗ /usr/local/bin/stap test.stp
variance = 1
```
However, if I uncomment the line with `@hist_log`, the variance changes to 0:
```
/usr/local/bin/stap test.stp
/tmp/stapEw5Hgt/stap_2d4787b763a02566bed18cc9de9268e2_1566_src.o: warning:
objtool: _stp_vsprint_memory+0x344: call to __get_user_nocheck_1() with UACCESS
enabled
variance = 0
value |-------------------------------------------------- count
0 | 0
1 |@ 1
2 |@@ 2
4 | 0
8 | 0
```
This behavior suggests that there might be an issue with how `@hist_log`
interacts with `@variance`. The presence of `@hist_log` seems to affect the
calculated variance value.
Could you please investigate this issue and provide any insights or fixes? Let
me know if you need any additional information.
Thank you!
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tapsets/31740] @hist_log affects the result of @variance
2024-05-15 7:10 [Bug tapsets/31740] New: @hist_log affects the result of @variance lijunlong at openresty dot com
@ 2024-05-15 18:49 ` agentzh at gmail dot com
2024-05-15 19:00 ` agentzh at gmail dot com
2024-05-15 19:01 ` fche at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: agentzh at gmail dot com @ 2024-05-15 18:49 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=31740
agentzh <agentzh at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |agentzh at gmail dot com
--- Comment #1 from agentzh <agentzh at gmail dot com> ---
OK, I've found the bug and will prepare a fix.
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tapsets/31740] @hist_log affects the result of @variance
2024-05-15 7:10 [Bug tapsets/31740] New: @hist_log affects the result of @variance lijunlong at openresty dot com
2024-05-15 18:49 ` [Bug tapsets/31740] " agentzh at gmail dot com
@ 2024-05-15 19:00 ` agentzh at gmail dot com
2024-05-15 19:01 ` fche at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: agentzh at gmail dot com @ 2024-05-15 19:00 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=31740
--- Comment #2 from agentzh <agentzh at gmail dot com> ---
Committed a fix as commit 289609c9b75. Thanks fche for the review.
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tapsets/31740] @hist_log affects the result of @variance
2024-05-15 7:10 [Bug tapsets/31740] New: @hist_log affects the result of @variance lijunlong at openresty dot com
2024-05-15 18:49 ` [Bug tapsets/31740] " agentzh at gmail dot com
2024-05-15 19:00 ` agentzh at gmail dot com
@ 2024-05-15 19:01 ` fche at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: fche at redhat dot com @ 2024-05-15 19:01 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=31740
Frank Ch. Eigler <fche at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
CC| |fche at redhat dot com
Status|UNCONFIRMED |RESOLVED
--- Comment #3 from Frank Ch. Eigler <fche at redhat dot com> ---
hurrah
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-05-15 19:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-15 7:10 [Bug tapsets/31740] New: @hist_log affects the result of @variance lijunlong at openresty dot com
2024-05-15 18:49 ` [Bug tapsets/31740] " agentzh at gmail dot com
2024-05-15 19:00 ` agentzh at gmail dot com
2024-05-15 19:01 ` fche at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).