kern_sdt.c (95ee2897e98f5d444f26ed2334cc7c439f9c16c6) kern_sdt.c (ddf0ed09bd8f83677407db36828aca2c10f419c9)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright 2006-2008 John Birrell <jb@FreeBSD.org>
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 23 unchanged lines hidden (view full) ---

32
33SDT_PROVIDER_DEFINE(sdt);
34
35/*
36 * Hook for the DTrace probe function. The SDT provider will set this to
37 * dtrace_probe() when it loads.
38 */
39sdt_probe_func_t sdt_probe_func = sdt_probe_stub;
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright 2006-2008 John Birrell <jb@FreeBSD.org>
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 23 unchanged lines hidden (view full) ---

32
33SDT_PROVIDER_DEFINE(sdt);
34
35/*
36 * Hook for the DTrace probe function. The SDT provider will set this to
37 * dtrace_probe() when it loads.
38 */
39sdt_probe_func_t sdt_probe_func = sdt_probe_stub;
40sdt_probe6_func_t sdt_probe6_func = (sdt_probe6_func_t)sdt_probe_stub;
40volatile bool __read_frequently sdt_probes_enabled;
41
42/*
43 * This is a stub for probe calls in case kernel DTrace support isn't
44 * enabled. It should never get called because there is no DTrace support
45 * to enable it.
46 */
47void
41volatile bool __read_frequently sdt_probes_enabled;
42
43/*
44 * This is a stub for probe calls in case kernel DTrace support isn't
45 * enabled. It should never get called because there is no DTrace support
46 * to enable it.
47 */
48void
48sdt_probe_stub(uint32_t id, uintptr_t arg0, uintptr_t arg1,
49 uintptr_t arg2, uintptr_t arg3, uintptr_t arg4)
49sdt_probe_stub(uint32_t id __unused, uintptr_t arg0 __unused,
50 uintptr_t arg1 __unused, uintptr_t arg2 __unused, uintptr_t arg3 __unused,
51 uintptr_t arg4 __unused)
50{
52{
51
52 printf("sdt_probe_stub: unexpectedly called\n");
53 kdb_backtrace();
54}
53 printf("sdt_probe_stub: unexpectedly called\n");
54 kdb_backtrace();
55}
56
57void
58sdt_probe(uint32_t id, uintptr_t arg0, uintptr_t arg1,
59 uintptr_t arg2, uintptr_t arg3, uintptr_t arg4)
60{
61 sdt_probe_func(id, arg0, arg1, arg2, arg3, arg4);
62}
63
64void
65sdt_probe6(uint32_t id, uintptr_t arg0, uintptr_t arg1,
66 uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t arg5)
67{
68 sdt_probe6_func(id, arg0, arg1, arg2, arg3, arg4, arg5);
69}