-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dtrace: move _sdt_probes array into a separately-compiled file
This means we no longer need to worry about whether Linux kernel headers include prototypes that we are declaring probes for, and can just unconditionally declare them. Having an exclusion list turned out to be untenable, because the set of headers transitively included from <linux/module.h> depends on kernel configuration as well as architecture: but *.sdtinfo.c only depends on <linux/sdt.h>, which is entirely under our control and we know includes no prototypes of anything that we might ever want to probe. We generate a separate .h file that only includes _sdt_probec and an extern definition of _sdt_probes, and include that from the .mod.c: the full definition of _sdt_probec is now separately compiled One downside is that we lie to make slightly now, telling it that *.mod.c depends on *.sdtinfo.c, when actually it depends on *.sdtinfo.h: but the two are generated by the same script at the same time so this isn't going to cause a problem. Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
- Loading branch information
1 parent
0236c7f
commit c731ef8
Showing
5 changed files
with
22 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,4 +160,5 @@ x509.genkey | |
# Generated DTrace SDT files | ||
# | ||
*.sdtinfo.c | ||
*.sdtinfo.h | ||
*.sdtstub.S |
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
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