With the sudden (large) increase of SDT probe points, the previously
statically defined default size for the kernel pdata block was not
sufficient. The code has been modified to calculate the required size
for the pdata block at runtime.
This primarily affects sparc where the pdata also covers the memory
block used for SDT trampolines. It is now dependent on the actual
number of SDT probes in the kernel.
This does not affect modules because they were already allocating the
needed memory block at load time based on the actual number of probes.
Orabug:
23004534
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Acked-by: Nick Alcock <nick.alcock@oracle.com>
typedef uint32_t asm_instr_t;
-#define SDT_TRAMP_SIZE 11
+#define SDT_TRAMP_SIZE 11
+#define DTRACE_PDATA_SIZE 64
+#define DTRACE_PDATA_EXTRA (dtrace_sdt_nprobes * SDT_TRAMP_SIZE * \
+ sizeof(asm_instr_t))
+#define DTRACE_PDATA_MAXSIZE (DTRACE_PDATA_SIZE + DTRACE_PDATA_EXTRA)
#endif /* _SPARC_DTRACE_ARCH_H */
typedef uint8_t asm_instr_t;
+#define DTRACE_PDATA_SIZE 64
+#define DTRACE_PDATA_EXTRA 0
+#define DTRACE_PDATA_MAXSIZE (DTRACE_PDATA_SIZE + DTRACE_PDATA_EXTRA)
+
#endif /* _X86_DTRACE_ARCH_H */
/*---------------------------------------------------------------------------*\
(* OS SPECIFIC DTRACE SETUP *)
\*---------------------------------------------------------------------------*/
-#define DTRACE_PDATA_MAXSIZE 2048
-
struct module *dtrace_kmod = NULL;
EXPORT_SYMBOL(dtrace_kmod);