-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure disassembly distinguishes between gvars and agg vars
When the disassembler recognizes access of a variable by value, it looks up a variable name that matches the offset and scope. The scope of aggregation variables is also "global", however, and so the presence of aggregations can lead to incorrect disassembly of global variables. Check the variable "kind" when looking up variables accessed by value. When the disassembler recognizes aggregation names, a similar test for them can be introduced. Signed-off-by: Eugene Loh <eugene.loh@oracle.com> Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
- Loading branch information
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
myvar_global |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
# | ||
# Oracle Linux DTrace. | ||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at | ||
# http://oss.oracle.com/licenses/upl. | ||
# | ||
|
||
dtrace=$1 | ||
|
||
# Test that annotation of gvars is not confused by agg vars. | ||
|
||
$dtrace $dt_flags -Sen ' | ||
BEGIN | ||
{ | ||
@myvar_agg = count(); | ||
myvar_global = 0xdeadbeef; | ||
exit(0); | ||
} | ||
' 2>&1 | grep -A4 deadbeef | awk '/myvar_/ {print $NF}' | ||
|
||
exit $? |