/* Light weight way to stop tracing. Use in conjunction with tracing_start.  */
void tracing_stop(void)
/* Light weight way to stop tracing. Use in conjunction with tracing_start.  */
void tracing_stop(void)
{
	struct ring_buffer *buffer;
	unsigned long flags;
	ftrace_stop();
	spin_lock_irqsave(&tracing_start_lock, flags);
	if (trace_stop_count++)
		goto out;
	buffer = global_trace.buffer;
	if (buffer)
		ring_buffer_record_disable(buffer);
	buffer = max_tr.buffer;
	if (buffer)
		ring_buffer_record_disable(buffer);
 out:
	spin_unlock_irqrestore(&tracing_start_lock, flags);
}