-
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.
The -xverbose option should be equivalent to the -S option. The -xverbose option sets DTRACE_C_DIFV in the dt_cflags, but the compiler only ever checked the cflags passed from the command line program for the DTRACE_C_DIFV flag. As a result, only -S had the intended behaviour whereas -xverbose was essentially ignored. Note that -xdisasm=N does not modify the -xverbose behaviour because the -xverbose option is specifically defined to providw clause disassembly (equivalent with -S without -xdisasm=N being specified). When a D script is compiled that is not a library script or the builtin ERROR probe, and the DTRACE_C_DIFV flag is set in dt_cflags, it is also set in the cflags used by the compiler. The support for -xcpp is also updated with this patch to set DTRACE_C_CPP under the same circumstances. Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com> Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
- Loading branch information
Showing
3 changed files
with
64 additions
and
24 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,19 @@ | ||
#!/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 | ||
|
||
$dtrace $dt_flags -S -n 'BEGIN { exit(0); }' 2>&1 | \ | ||
awk '{ print; } | ||
/^Disassembly of clause :::BEGIN/ { hdr = 1; next; } | ||
/^[0-9]{4} [0-9]{5}: [0-9a-f]{2} / { ins++; next; } | ||
END { | ||
exit(hdr && ins > 20 ? 0 : 1); | ||
}' | ||
|
||
exit $? |
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,19 @@ | ||
#!/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 | ||
|
||
$dtrace $dt_flags -xverbose -n 'BEGIN { exit(0); }' 2>&1 | \ | ||
awk '{ print; } | ||
/^Disassembly of clause :::BEGIN/ { hdr = 1; next; } | ||
/^[0-9]{4} [0-9]{5}: [0-9a-f]{2} / { ins++; next; } | ||
END { | ||
exit(hdr && ins > 20 ? 0 : 1); | ||
}' | ||
|
||
exit $? |