All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/8] sched: clean up unnecessary includes and functions
@ 2025-03-07 21:34 Kris Van Hees
  2025-03-07 21:34 ` [PATCH 3/8] rawfbt: perform lookup on true symbol names Kris Van Hees
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Kris Van Hees @ 2025-03-07 21:34 UTC (permalink / raw)
  To: dtrace, dtrace-devel; +Cc: Kris Van Hees

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
---
 libdtrace/dt_prov_sched.c | 30 ++----------------------------
 1 file changed, 2 insertions(+), 28 deletions(-)

diff --git a/libdtrace/dt_prov_sched.c b/libdtrace/dt_prov_sched.c
index e05ef246..125d5891 100644
--- a/libdtrace/dt_prov_sched.c
+++ b/libdtrace/dt_prov_sched.c
@@ -1,6 +1,6 @@
 /*
  * Oracle Linux DTrace.
- * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2023, 2025, 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.
  *
@@ -9,9 +9,6 @@
 #include <assert.h>
 #include <errno.h>
 
-#include <linux/perf_event.h>
-#include <perfmon/pfmlib_perf_event.h>
-
 #include "dt_dctx.h"
 #include "dt_cg.h"
 #include "dt_provider_sdt.h"
@@ -146,36 +143,13 @@ static int trampoline(dt_pcb_t *pcb, uint_t exitlbl)
 	return 0;
 }
 
-/*
- * We need a custom enabling for on-cpu probes to ensure that the fbt function
- * __perf_event_task_sched_in is called.  __perf_event_task_sched_in will not
- * be called unless context switch perf events have been enabled, so we do that
- * here by opening a context switch count perf event but not attaching anything
- * to it to minimize overhead.  The alternative - attaching to
- * cpc:::context_switches-all-1 and weeding out on- versus off-cpu events via a
- * trampoline is too expensive.  This approach works stably across kernels
- * because __perf_event_task_sched_in() is not static, so not potentially
- * subject to inlining or other optimizations.
- */
-static void enable(dtrace_hdl_t *dtp, dt_probe_t *prp)
-{
-	return dt_sdt_enable(dtp, prp);
-}
-
-static void detach(dtrace_hdl_t *dtp, const dt_probe_t *prp)
-{
-	if (prp->prv_data)
-		close((int)(long)prp->prv_data);
-}
-
 dt_provimpl_t	dt_sched = {
 	.name		= prvname,
 	.prog_type	= BPF_PROG_TYPE_UNSPEC,
 	.populate	= &populate,
-	.enable		= &enable,
+	.enable		= &dt_sdt_enable,
 	.load_prog	= &dt_bpf_prog_load,
 	.trampoline	= &trampoline,
 	.probe_info	= &dt_sdt_probe_info,
-	.detach		= &detach,
 	.destroy	= &dt_sdt_destroy,
 };
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-03-18  5:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-07 21:34 [PATCH 2/8] sched: clean up unnecessary includes and functions Kris Van Hees
2025-03-07 21:34 ` [PATCH 3/8] rawfbt: perform lookup on true symbol names Kris Van Hees
2025-03-10 22:03   ` Eugene Loh
2025-03-07 21:34 ` [PATCH 4/8] ksyms: make symbol name filters less picky Kris Van Hees
2025-03-10 22:04   ` Eugene Loh
2025-03-07 21:34 ` [PATCH 5/8] symtab: add support for 'traceable' flag Kris Van Hees
2025-03-18  5:26   ` [DTrace-devel] " Eugene Loh
2025-03-07 21:34 ` [PATCH 6/8] fbt: performance improvements Kris Van Hees
2025-03-12  5:17   ` Eugene Loh
2025-03-12  5:33     ` Kris Van Hees
2025-03-17 21:00       ` Eugene Loh
2025-03-17 21:15         ` Kris Van Hees
2025-03-07 21:34 ` [PATCH 7/8] rawfbt: " Kris Van Hees
2025-03-07 21:34 ` [PATCH 8/8] fbt, rawfbt: consolidate code to avoid duplication Kris Van Hees

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.