Skip to content

Commit 4b04365

Browse files
kvanheesnickalcock
authored andcommitted
dtrace: profile and tick providers built on cyclics
Probes are constructed dynamically as called upon by the user: some default commonly-used probes for common timing frequencies are provided whether or not called upon. Signed-off-by: Kris Van Hees <[email protected]> Signed-off-by: Nick Alcock <[email protected]> Signed-off-by: Tomas Jedlicka <[email protected]> Signed-off-by: Eugene Loh <[email protected]> Signed-off-by: David Mc Lean <[email protected]> Signed-off-by: Vincent Lim <[email protected]>
1 parent d5dcf17 commit 4b04365

File tree

4 files changed

+576
-0
lines changed

4 files changed

+576
-0
lines changed

dtrace/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#
44

55
obj-$(CONFIG_DT_CORE) += dtrace.o
6+
obj-$(CONFIG_DT_PROFILE) += profile.o
67
obj-$(CONFIG_DT_SDT) += sdt.o
78
obj-$(CONFIG_DT_SYSTRACE) += systrace.o
89
obj-$(CONFIG_DT_DT_TEST) += dt_test.o
@@ -16,6 +17,7 @@ dtrace-y := dtrace_mod.o dtrace_dev.o \
1617
dtrace_probe.o dtrace_probe_ctx.o \
1718
dtrace_ptofapi.o dtrace_predicate.o \
1819
dtrace_spec.o dtrace_state.o dtrace_util.o
20+
profile-y := profile_mod.o profile_dev.o
1921
sdt-y := sdt_mod.o sdt_dev.o
2022
systrace-y := systrace_mod.o systrace_dev.o
2123
dt_test-y := dt_test_mod.o dt_test_dev.o

dtrace/profile.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
/*
3+
* Dynamic Tracing for Linux - profile provider
4+
*
5+
* Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
6+
*
7+
* This program is free software; you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation; either version 2 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*/
17+
18+
#ifndef _PROFILE_H_
19+
#define _PROFILE_H_
20+
21+
extern void profile_provide(void *, const dtrace_probedesc_t *);
22+
extern int profile_enable(void *, dtrace_id_t, void *);
23+
extern void profile_disable(void *, dtrace_id_t, void *);
24+
extern int profile_usermode(void *, dtrace_id_t, void *);
25+
extern void profile_destroy(void *, dtrace_id_t, void *);
26+
27+
extern dtrace_provider_id_t profile_id;
28+
29+
extern int profile_dev_init(void);
30+
extern void profile_dev_exit(void);
31+
32+
#endif /* _PROFILE_H_ */

0 commit comments

Comments
 (0)