mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-17 01:34:00 +08:00
Minor tracing fixes:
- Fix unregistering the same event twice a the user could disable the event osnoise will disable on unregistering. - Inform RCU of a quiescent state in the osnoise testing thread. - Fix some kerneldoc comments. -----BEGIN PGP SIGNATURE----- iIoEABYIADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCYioe0BQccm9zdGVkdEBn b29kbWlzLm9yZwAKCRAp5XQQmuv6qohMAQCcnN4Iy9LcKX02A5HcuUxIdH3ktOqt lbc24+nb6AO+/wD+Ilnlx/Ir09HgaL7NreSAc0tvLMwRgaM+grLA82IRTwc= =quYh -----END PGP SIGNATURE----- Merge tag 'trace-v5.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Minor tracing fixes: - Fix unregistering the same event twice. A user could disable the same event that osnoise will disable on unregistering. - Inform RCU of a quiescent state in the osnoise testing thread. - Fix some kerneldoc comments" * tag 'trace-v5.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace: Fix some W=1 warnings in kernel doc comments tracing/osnoise: Force quiescent states while tracing tracing/osnoise: Do not unregister events twice
This commit is contained in:
commit
dda64ead7e
@ -7790,7 +7790,7 @@ int ftrace_is_dead(void)
|
||||
|
||||
/**
|
||||
* register_ftrace_function - register a function for profiling
|
||||
* @ops - ops structure that holds the function for profiling.
|
||||
* @ops: ops structure that holds the function for profiling.
|
||||
*
|
||||
* Register a function to be called by all functions in the
|
||||
* kernel.
|
||||
@ -7817,7 +7817,7 @@ EXPORT_SYMBOL_GPL(register_ftrace_function);
|
||||
|
||||
/**
|
||||
* unregister_ftrace_function - unregister a function for profiling.
|
||||
* @ops - ops structure that holds the function to unregister
|
||||
* @ops: ops structure that holds the function to unregister
|
||||
*
|
||||
* Unregister a function that was added to be called by ftrace profiling.
|
||||
*/
|
||||
|
@ -1386,6 +1386,26 @@ static int run_osnoise(void)
|
||||
osnoise_stop_tracing();
|
||||
}
|
||||
|
||||
/*
|
||||
* In some cases, notably when running on a nohz_full CPU with
|
||||
* a stopped tick PREEMPT_RCU has no way to account for QSs.
|
||||
* This will eventually cause unwarranted noise as PREEMPT_RCU
|
||||
* will force preemption as the means of ending the current
|
||||
* grace period. We avoid this problem by calling
|
||||
* rcu_momentary_dyntick_idle(), which performs a zero duration
|
||||
* EQS allowing PREEMPT_RCU to end the current grace period.
|
||||
* This call shouldn't be wrapped inside an RCU critical
|
||||
* section.
|
||||
*
|
||||
* Note that in non PREEMPT_RCU kernels QSs are handled through
|
||||
* cond_resched()
|
||||
*/
|
||||
if (IS_ENABLED(CONFIG_PREEMPT_RCU)) {
|
||||
local_irq_disable();
|
||||
rcu_momentary_dyntick_idle();
|
||||
local_irq_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
* For the non-preemptive kernel config: let threads runs, if
|
||||
* they so wish.
|
||||
@ -2200,6 +2220,17 @@ static void osnoise_workload_stop(void)
|
||||
if (osnoise_has_registered_instances())
|
||||
return;
|
||||
|
||||
/*
|
||||
* If callbacks were already disabled in a previous stop
|
||||
* call, there is no need to disable then again.
|
||||
*
|
||||
* For instance, this happens when tracing is stopped via:
|
||||
* echo 0 > tracing_on
|
||||
* echo nop > current_tracer.
|
||||
*/
|
||||
if (!trace_osnoise_callback_enabled)
|
||||
return;
|
||||
|
||||
trace_osnoise_callback_enabled = false;
|
||||
/*
|
||||
* Make sure that ftrace_nmi_enter/exit() see
|
||||
|
Loading…
Reference in New Issue
Block a user