-
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.
Build against libctf (from binutils) if available
CTF suypport can be provided by the libdtrace-ctf library (originally part of the legacy DTrace implementation) or by the libctf that is included in newer binutils versions. The config detection mechanism added to determine whether libctf is available provides a HAVE_LIBCTF define to use in source code and also a HAVE_LIBCTF symbol that can be tested for in makefiles. This patch provides the changes in the DTrace v2 source tree to build against libctf when it is available. When it is not available, building agaist libdtrace-ctf is attempted (and if that is not found a build error will result). Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
- Loading branch information
1 parent
002fc5b
commit 188bf56
Showing
13 changed files
with
84 additions
and
11 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,20 @@ | ||
/* | ||
* Oracle Linux DTrace. | ||
* Copyright (c) 2020, 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. | ||
*/ | ||
|
||
#ifndef _DT_CTF_API_H | ||
#define _DT_CTF_API_H | ||
|
||
#include <config.h> | ||
|
||
#ifdef HAVE_LIBCTF | ||
# include <ctf-api.h> | ||
# define ctf_close(fp) ctf_file_close(fp) | ||
#else | ||
# include <sys/ctf_api.h> | ||
#endif | ||
|
||
#endif /* _DT_CTF_API_H */ |
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,29 @@ | ||
/* | ||
* Oracle Linux DTrace. | ||
* Copyright (c) 2019, 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. | ||
*/ | ||
|
||
#ifndef _DT_BPF_MAPS_H | ||
#define _DT_BPF_MAPS_H | ||
|
||
#ifdef FIXME | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
typedef struct dt_bpf_probe dt_bpf_probe_t; | ||
struct dt_bpf_probe { | ||
uint_t prvv; /* probeprov string offset in strtab */ | ||
uint_t mod; /* probemod string offset in strtab */ | ||
uint_t fun; /* probefunc string offset in strtab */ | ||
uint_t prb; /* probename string offset in strtab */ | ||
}; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
#endif | ||
|
||
#endif /* _DT_BPF_FUNCS_H */ |
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
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
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