您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ trace_test_buffer函数代码示例

51自学网 2021-06-03 08:56:44
  C++
这篇教程C++ trace_test_buffer函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中trace_test_buffer函数的典型用法代码示例。如果您正苦于以下问题:C++ trace_test_buffer函数的具体用法?C++ trace_test_buffer怎么用?C++ trace_test_buffer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了trace_test_buffer函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: trace_selftest_startup_preemptoff

inttrace_selftest_startup_preemptoff(struct tracer *trace, struct trace_array *tr){	unsigned long save_max = tracing_max_latency;	unsigned long count;	int ret;	/* start the tracing */	tr->ctrl = 1;	trace->init(tr);	/* reset the max latency */	tracing_max_latency = 0;	/* disable preemption for a bit */	preempt_disable();	udelay(100);	preempt_enable();	/* stop the tracing. */	tr->ctrl = 0;	trace->ctrl_update(tr);	/* check both trace buffers */	ret = trace_test_buffer(tr, NULL);	if (!ret)		ret = trace_test_buffer(&max_tr, &count);	trace->reset(tr);	if (!ret && !count) {		printk(KERN_CONT ".. no entries found ..");		ret = -1;	}	tracing_max_latency = save_max;	return ret;}
开发者ID:mpalmer,项目名称:linux-2.6,代码行数:34,


示例2: trace_selftest_startup_preemptoff

inttrace_selftest_startup_preemptoff(struct tracer *trace, struct trace_array *tr){	unsigned long save_max = tr->max_latency;	unsigned long count;	int ret;	/*	 * Now that the big kernel lock is no longer preemptable,	 * and this is called with the BKL held, it will always	 * fail. If preemption is already disabled, simply	 * pass the test. When the BKL is removed, or becomes	 * preemptible again, we will once again test this,	 * so keep it in.	 */	if (preempt_count()) {		printk(KERN_CONT "can not test ... force ");		return 0;	}	/* start the tracing */	ret = tracer_init(trace, tr);	if (ret) {		warn_failed_init_tracer(trace, ret);		return ret;	}	/* reset the max latency */	tr->max_latency = 0;	/* disable preemption for a bit */	preempt_disable();	udelay(100);	preempt_enable();	/*	 * Stop the tracer to avoid a warning subsequent	 * to buffer flipping failure because tracing_stop()	 * disables the tr and max buffers, making flipping impossible	 * in case of parallels max preempt off latencies.	 */	trace->stop(tr);	/* stop the tracing. */	tracing_stop();	/* check both trace buffers */	ret = trace_test_buffer(&tr->trace_buffer, NULL);	if (!ret)		ret = trace_test_buffer(&tr->max_buffer, &count);	trace->reset(tr);	tracing_start();	if (!ret && !count) {		printk(KERN_CONT ".. no entries found ..");		ret = -1;	}	tr->max_latency = save_max;	return ret;}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:59,


示例3: trace_selftest_startup_preemptoff

inttrace_selftest_startup_preemptoff(struct tracer *trace, struct trace_array *tr){	unsigned long save_max = tracing_max_latency;	unsigned long count;	int ret;	/*                                                                                                                                                                                                                                                                                                   */	if (preempt_count()) {		printk(KERN_CONT "can not test ... force ");		return 0;	}	/*                   */	ret = tracer_init(trace, tr);	if (ret) {		warn_failed_init_tracer(trace, ret);		return ret;	}	/*                       */	tracing_max_latency = 0;	/*                              */	preempt_disable();	udelay(100);	preempt_enable();	/*                                                                                                                                                                                                                          */	trace->stop(tr);	/*                   */	tracing_stop();	/*                          */	ret = trace_test_buffer(tr, NULL);	if (!ret)		ret = trace_test_buffer(&max_tr, &count);	trace->reset(tr);	tracing_start();	if (!ret && !count) {		printk(KERN_CONT ".. no entries found ..");		ret = -1;	}	tracing_max_latency = save_max;	return ret;}
开发者ID:romanbb,项目名称:android_kernel_lge_d851,代码行数:59,


示例4: trace_selftest_startup_branch

inttrace_selftest_startup_branch(struct tracer *trace, struct trace_array *tr){	unsigned long count;	int ret;	/* start the tracing */	ret = tracer_init(trace, tr);	if (ret) {		warn_failed_init_tracer(trace, ret);		return ret;	}	/* Sleep for a 1/10 of a second */	msleep(100);	/* stop the tracing. */	tracing_stop();	/* check the trace buffer */	ret = trace_test_buffer(tr, &count);	trace->reset(tr);	tracing_start();	if (!ret && !count) {		printk(KERN_CONT ".. no entries found ..");		ret = -1;	}	return ret;}
开发者ID:ANFS,项目名称:ANFS-kernel,代码行数:29,


示例5: trace_selftest_startup_function_graph

/* * Pretty much the same than for the function tracer from which the selftest * has been borrowed. */__init inttrace_selftest_startup_function_graph(struct tracer *trace,					struct trace_array *tr){	int ret;	unsigned long count;#ifdef CONFIG_DYNAMIC_FTRACE	if (ftrace_filter_param) {		printk(KERN_CONT " ... kernel command line filter set: force PASS ... ");		return 0;	}#endif	/*	 * Simulate the init() callback but we attach a watchdog callback	 * to detect and recover from possible hangs	 */	tracing_reset_online_cpus(&tr->trace_buffer);	set_graph_array(tr);	ret = register_ftrace_graph(&fgraph_ops);	if (ret) {		warn_failed_init_tracer(trace, ret);		goto out;	}	tracing_start_cmdline_record();	/* Sleep for a 1/10 of a second */	msleep(100);	/* Have we just recovered from a hang? */	if (graph_hang_thresh > GRAPH_MAX_FUNC_TEST) {		tracing_selftest_disabled = true;		ret = -1;		goto out;	}	tracing_stop();	/* check the trace buffer */	ret = trace_test_buffer(&tr->trace_buffer, &count);	trace->reset(tr);	tracing_start();	if (!ret && !count) {		printk(KERN_CONT ".. no entries found ..");		ret = -1;		goto out;	}	/* Don't test dynamic tracing, the function tracer already did */out:	/* Stop it if we failed */	if (ret)		ftrace_graph_stop();	return ret;}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:64,


示例6: trace_selftest_startup_sched_switch

inttrace_selftest_startup_sched_switch(struct tracer *trace, struct trace_array *tr){	unsigned long count;	int ret;	/* start the tracing */	tr->ctrl = 1;	trace->init(tr);	/* Sleep for a 1/10 of a second */	msleep(100);	/* stop the tracing. */	tr->ctrl = 0;	trace->ctrl_update(tr);	/* check the trace buffer */	ret = trace_test_buffer(tr, &count);	trace->reset(tr);	if (!ret && !count) {		printk(KERN_CONT ".. no entries found ..");		ret = -1;	}	return ret;}
开发者ID:mpalmer,项目名称:linux-2.6,代码行数:25,


示例7: trace_selftest_startup_irqsoff

inttrace_selftest_startup_irqsoff(struct tracer *trace, struct trace_array *tr){	unsigned long save_max = tr->max_latency;	unsigned long count;	int ret;	/* start the tracing */	ret = tracer_init(trace, tr);	if (ret) {		warn_failed_init_tracer(trace, ret);		return ret;	}	/* reset the max latency */	tr->max_latency = 0;	/* disable interrupts for a bit */	local_irq_disable();	udelay(100);	local_irq_enable();	/*	 * Stop the tracer to avoid a warning subsequent	 * to buffer flipping failure because tracing_stop()	 * disables the tr and max buffers, making flipping impossible	 * in case of parallels max irqs off latencies.	 */	trace->stop(tr);	/* stop the tracing. */	tracing_stop();	/* check both trace buffers */	ret = trace_test_buffer(&tr->trace_buffer, NULL);	if (!ret)		ret = trace_test_buffer(&tr->max_buffer, &count);	trace->reset(tr);	tracing_start();	if (!ret && !count) {		printk(KERN_CONT ".. no entries found ..");		ret = -1;	}	tr->max_latency = save_max;	return ret;}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:46,


示例8: trace_selftest_startup_function

/* * Simple verification test of ftrace function tracer. * Enable ftrace, sleep 1/10 second, and then read the trace * buffer to see if all is in order. */inttrace_selftest_startup_function(struct tracer *trace, struct trace_array *tr){	int save_ftrace_enabled = ftrace_enabled;	unsigned long count;	int ret;	/* make sure msleep has been recorded */	msleep(1);	/* start the tracing */	ftrace_enabled = 1;	ret = tracer_init(trace, tr);	if (ret) {		warn_failed_init_tracer(trace, ret);		goto out;	}	/* Sleep for a 1/10 of a second */	msleep(100);	/* stop the tracing. */	tracing_stop();	ftrace_enabled = 0;	/* check the trace buffer */	ret = trace_test_buffer(tr, &count);	trace->reset(tr);	tracing_start();	if (!ret && !count) {		printk(KERN_CONT ".. no entries found ..");		ret = -1;		goto out;	}	ret = trace_selftest_startup_dynamic_tracing(trace, tr,						     DYN_FTRACE_TEST_NAME);	if (ret)		goto out;	ret = trace_selftest_function_recursion();	if (ret)		goto out;	ret = trace_selftest_function_regs(); out:	ftrace_enabled = save_ftrace_enabled;	/* kill ftrace totally if we failed */	if (ret)		ftrace_kill();	return ret;}
开发者ID:Forzaferrarileo,项目名称:linux,代码行数:60,


示例9: trace_selftest_startup_function_graph

inttrace_selftest_startup_function_graph(struct tracer *trace,					struct trace_array *tr){	int ret;	unsigned long count;	/*                                                                                                                 */	tracing_reset_online_cpus(tr);	set_graph_array(tr);	ret = register_ftrace_graph(&trace_graph_return,				    &trace_graph_entry_watchdog);	if (ret) {		warn_failed_init_tracer(trace, ret);		goto out;	}	tracing_start_cmdline_record();	/*                              */	msleep(100);	/*                                     */	if (graph_hang_thresh > GRAPH_MAX_FUNC_TEST) {		tracing_selftest_disabled = true;		ret = -1;		goto out;	}	tracing_stop();	/*                        */	ret = trace_test_buffer(tr, &count);	trace->reset(tr);	tracing_start();	if (!ret && !count) {		printk(KERN_CONT ".. no entries found ..");		ret = -1;		goto out;	}	/*                                                             */out:	/*                      */	if (ret)		ftrace_graph_stop();	return ret;}
开发者ID:romanbb,项目名称:android_kernel_lge_d851,代码行数:54,


示例10: trace_selftest_startup_hw_branches

inttrace_selftest_startup_hw_branches(struct tracer *trace,				   struct trace_array *tr){	struct trace_iterator *iter;	struct tracer tracer;	unsigned long count;	int ret;	if (!trace->open) {		printk(KERN_CONT "missing open function...");		return -1;	}	ret = tracer_init(trace, tr);	if (ret) {		warn_failed_init_tracer(trace, ret);		return ret;	}	/*	 * The hw-branch tracer needs to collect the trace from the various	 * cpu trace buffers - before tracing is stopped.	 */	iter = kzalloc(sizeof(*iter), GFP_KERNEL);	if (!iter)		return -ENOMEM;	memcpy(&tracer, trace, sizeof(tracer));	iter->trace = &tracer;	iter->tr = tr;	iter->pos = -1;	mutex_init(&iter->mutex);	trace->open(iter);	mutex_destroy(&iter->mutex);	kfree(iter);	tracing_stop();	ret = trace_test_buffer(tr, &count);	trace->reset(tr);	tracing_start();	if (!ret && !count) {		printk(KERN_CONT "no entries found..");		ret = -1;	}	return ret;}
开发者ID:mikuhatsune001,项目名称:linux2.6.32,代码行数:53,


示例11: trace_selftest_startup_irqsoff

inttrace_selftest_startup_irqsoff(struct tracer *trace, struct trace_array *tr){	unsigned long save_max = tracing_max_latency;	unsigned long count;	int ret;	/* start the tracing */	ret = trace->init(tr);	if (ret) {		warn_failed_init_tracer(trace, ret);		return ret;	}	/* reset the max latency */	tracing_max_latency = 0;	/* disable interrupts for a bit */	local_irq_disable();	udelay(100);	local_irq_enable();	/* stop the tracing. */	tracing_stop();	/* check both trace buffers */	ret = trace_test_buffer(tr, NULL);	if (!ret)		ret = trace_test_buffer(&max_tr, &count);	trace->reset(tr);	tracing_start();	if (!ret && !count) {		printk(KERN_CONT ".. no entries found ..");		ret = -1;	}	tracing_max_latency = save_max;	return ret;}
开发者ID:percy-g2,项目名称:rowboat-kernel,代码行数:38,


示例12: trace_selftest_startup_sysprof

inttrace_selftest_startup_sysprof(struct tracer *trace, struct trace_array *tr){	unsigned long count;	int ret;	/* start the tracing */	tr->ctrl = 1;	trace->init(tr);	/* Sleep for a 1/10 of a second */	msleep(100);	/* stop the tracing. */	tr->ctrl = 0;	trace->ctrl_update(tr);	/* check the trace buffer */	ret = trace_test_buffer(tr, &count);	trace->reset(tr);	return ret;}
开发者ID:mpalmer,项目名称:linux-2.6,代码行数:20,


示例13: trace_selftest_startup_sysprof

inttrace_selftest_startup_sysprof(struct tracer *trace, struct trace_array *tr){	unsigned long count;	int ret;	/* start the tracing */	ret = trace->init(tr);	if (ret) {		warn_failed_init_tracer(trace, ret);		return 0;	}	/* Sleep for a 1/10 of a second */	msleep(100);	/* stop the tracing. */	tracing_stop();	/* check the trace buffer */	ret = trace_test_buffer(tr, &count);	trace->reset(tr);	tracing_start();	return ret;}
开发者ID:percy-g2,项目名称:rowboat-kernel,代码行数:24,


示例14: trace_wakeup_test_thread

static int trace_wakeup_test_thread(void *data){	/* Make this a RT thread, doesn't need to be too high */	struct sched_param param = { .sched_priority = 5 };	struct completion *x = data;	sched_setscheduler(current, SCHED_FIFO, &param);	/* Make it know we have a new prio */	complete(x);	/* now go to sleep and let the test wake us up */	set_current_state(TASK_INTERRUPTIBLE);	schedule();	/* we are awake, now wait to disappear */	while (!kthread_should_stop()) {		/*		 * This is an RT task, do short sleeps to let		 * others run.		 */		msleep(100);	}	return 0;}inttrace_selftest_startup_wakeup(struct tracer *trace, struct trace_array *tr){	unsigned long save_max = tracing_max_latency;	struct task_struct *p;	struct completion isrt;	unsigned long count;	int ret;	init_completion(&isrt);	/* create a high prio thread */	p = kthread_run(trace_wakeup_test_thread, &isrt, "ftrace-test");	if (IS_ERR(p)) {		printk(KERN_CONT "Failed to create ftrace wakeup test thread ");		return -1;	}	/* make sure the thread is running at an RT prio */	wait_for_completion(&isrt);	/* start the tracing */	tr->ctrl = 1;	trace->init(tr);	/* reset the max latency */	tracing_max_latency = 0;	/* sleep to let the RT thread sleep too */	msleep(100);	/*	 * Yes this is slightly racy. It is possible that for some	 * strange reason that the RT thread we created, did not	 * call schedule for 100ms after doing the completion,	 * and we do a wakeup on a task that already is awake.	 * But that is extremely unlikely, and the worst thing that	 * happens in such a case, is that we disable tracing.	 * Honestly, if this race does happen something is horrible	 * wrong with the system.	 */	wake_up_process(p);	/* give a little time to let the thread wake up */	msleep(100);	/* stop the tracing. */	tr->ctrl = 0;	trace->ctrl_update(tr);	/* check both trace buffers */	ret = trace_test_buffer(tr, NULL);	if (!ret)		ret = trace_test_buffer(&max_tr, &count);	trace->reset(tr);	tracing_max_latency = save_max;	/* kill the thread */	kthread_stop(p);	if (!ret && !count) {		printk(KERN_CONT ".. no entries found ..");		ret = -1;	}	return ret;}
开发者ID:mpalmer,项目名称:linux-2.6,代码行数:96,


示例15: trace_selftest_startup_preemptirqsoff

inttrace_selftest_startup_preemptirqsoff(struct tracer *trace, struct trace_array *tr){	unsigned long save_max = tracing_max_latency;	unsigned long count;	int ret;	/* start the tracing */	tr->ctrl = 1;	trace->init(tr);	/* reset the max latency */	tracing_max_latency = 0;	/* disable preemption and interrupts for a bit */	preempt_disable();	local_irq_disable();	udelay(100);	preempt_enable();	/* reverse the order of preempt vs irqs */	local_irq_enable();	/* stop the tracing. */	tr->ctrl = 0;	trace->ctrl_update(tr);	/* check both trace buffers */	ret = trace_test_buffer(tr, NULL);	if (ret)		goto out;	ret = trace_test_buffer(&max_tr, &count);	if (ret)		goto out;	if (!ret && !count) {		printk(KERN_CONT ".. no entries found ..");		ret = -1;		goto out;	}	/* do the test by disabling interrupts first this time */	tracing_max_latency = 0;	tr->ctrl = 1;	trace->ctrl_update(tr);	preempt_disable();	local_irq_disable();	udelay(100);	preempt_enable();	/* reverse the order of preempt vs irqs */	local_irq_enable();	/* stop the tracing. */	tr->ctrl = 0;	trace->ctrl_update(tr);	/* check both trace buffers */	ret = trace_test_buffer(tr, NULL);	if (ret)		goto out;	ret = trace_test_buffer(&max_tr, &count);	if (!ret && !count) {		printk(KERN_CONT ".. no entries found ..");		ret = -1;		goto out;	} out:	trace->reset(tr);	tracing_max_latency = save_max;	return ret;}
开发者ID:mpalmer,项目名称:linux-2.6,代码行数:73,


示例16: trace_wakeup_test_thread

static int trace_wakeup_test_thread(void *data){	/* Make this a RT thread, doesn't need to be too high */	static const struct sched_param param = { .sched_priority = 5 };	struct completion *x = data;	sched_setscheduler(current, SCHED_FIFO, &param);	/* Make it know we have a new prio */	complete(x);	/* now go to sleep and let the test wake us up */	set_current_state(TASK_INTERRUPTIBLE);	schedule();	complete(x);	/* we are awake, now wait to disappear */	while (!kthread_should_stop()) {		/*		 * This is an RT task, do short sleeps to let		 * others run.		 */		msleep(100);	}	return 0;}inttrace_selftest_startup_wakeup(struct tracer *trace, struct trace_array *tr){	unsigned long save_max = tracing_max_latency;	struct task_struct *p;	struct completion isrt;	unsigned long count;	int ret;	init_completion(&isrt);	/* create a high prio thread */	p = kthread_run(trace_wakeup_test_thread, &isrt, "ftrace-test");	if (IS_ERR(p)) {		printk(KERN_CONT "Failed to create ftrace wakeup test thread ");		return -1;	}	/* make sure the thread is running at an RT prio */	wait_for_completion(&isrt);	/* start the tracing */	ret = tracer_init(trace, tr);	if (ret) {		warn_failed_init_tracer(trace, ret);		return ret;	}	/* reset the max latency */	tracing_max_latency = 0;	while (p->on_rq) {		/*		 * Sleep to make sure the RT thread is asleep too.		 * On virtual machines we can't rely on timings,		 * but we want to make sure this test still works.		 */		msleep(100);	}	init_completion(&isrt);	wake_up_process(p);	/* Wait for the task to wake up */	wait_for_completion(&isrt);	/* stop the tracing. */	tracing_stop();	/* check both trace buffers */	ret = trace_test_buffer(tr, NULL);	printk("ret = %d/n", ret);	if (!ret)		ret = trace_test_buffer(&max_tr, &count);	trace->reset(tr);	tracing_start();	tracing_max_latency = save_max;	/* kill the thread */	kthread_stop(p);	if (!ret && !count) {		printk(KERN_CONT ".. no entries found ..");		ret = -1;	}	return ret;}
开发者ID:Forzaferrarileo,项目名称:linux,代码行数:100,


示例17: trace_selftest_startup_preemptirqsoff

inttrace_selftest_startup_preemptirqsoff(struct tracer *trace, struct trace_array *tr){	unsigned long save_max = tracing_max_latency;	unsigned long count;	int ret;	/*	 * Now that the big kernel lock is no longer preemptable,	 * and this is called with the BKL held, it will always	 * fail. If preemption is already disabled, simply	 * pass the test. When the BKL is removed, or becomes	 * preemptible again, we will once again test this,	 * so keep it in.	 */	if (preempt_count()) {		printk(KERN_CONT "can not test ... force ");		return 0;	}	/* start the tracing */	ret = trace->init(tr);	if (ret) {		warn_failed_init_tracer(trace, ret);		goto out;	}	/* reset the max latency */	tracing_max_latency = 0;	/* disable preemption and interrupts for a bit */	preempt_disable();	local_irq_disable();	udelay(100);	preempt_enable();	/* reverse the order of preempt vs irqs */	local_irq_enable();	/* stop the tracing. */	tracing_stop();	/* check both trace buffers */	ret = trace_test_buffer(tr, NULL);	if (ret) {		tracing_start();		goto out;	}	ret = trace_test_buffer(&max_tr, &count);	if (ret) {		tracing_start();		goto out;	}	if (!ret && !count) {		printk(KERN_CONT ".. no entries found ..");		ret = -1;		tracing_start();		goto out;	}	/* do the test by disabling interrupts first this time */	tracing_max_latency = 0;	tracing_start();	preempt_disable();	local_irq_disable();	udelay(100);	preempt_enable();	/* reverse the order of preempt vs irqs */	local_irq_enable();	/* stop the tracing. */	tracing_stop();	/* check both trace buffers */	ret = trace_test_buffer(tr, NULL);	if (ret)		goto out;	ret = trace_test_buffer(&max_tr, &count);	if (!ret && !count) {		printk(KERN_CONT ".. no entries found ..");		ret = -1;		goto out;	} out:	trace->reset(tr);	tracing_start();	tracing_max_latency = save_max;	return ret;}
开发者ID:percy-g2,项目名称:rowboat-kernel,代码行数:92,


示例18: trace_selftest_startup_dynamic_tracing

/* Test dynamic code modification and ftrace filters */int trace_selftest_startup_dynamic_tracing(struct tracer *trace,					   struct trace_array *tr,					   int (*func)(void)){	int save_ftrace_enabled = ftrace_enabled;	int save_tracer_enabled = tracer_enabled;	unsigned long count;	char *func_name;	int ret;	/* The ftrace test PASSED */	printk(KERN_CONT "PASSED/n");	pr_info("Testing dynamic ftrace: ");	/* enable tracing, and record the filter function */	ftrace_enabled = 1;	tracer_enabled = 1;	/* passed in by parameter to fool gcc from optimizing */	func();	/* update the records */	ret = ftrace_force_update();	if (ret) {		printk(KERN_CONT ".. ftraced failed .. ");		return ret;	}	/*	 * Some archs *cough*PowerPC*cough* add charachters to the	 * start of the function names. We simply put a '*' to	 * accomodate them.	 */	func_name = "*" STR(DYN_FTRACE_TEST_NAME);	/* filter only on our function */	ftrace_set_filter(func_name, strlen(func_name), 1);	/* enable tracing */	tr->ctrl = 1;	trace->init(tr);	/* Sleep for a 1/10 of a second */	msleep(100);	/* we should have nothing in the buffer */	ret = trace_test_buffer(tr, &count);	if (ret)		goto out;	if (count) {		ret = -1;		printk(KERN_CONT ".. filter did not filter .. ");		goto out;	}	/* call our function again */	func();	/* sleep again */	msleep(100);	/* stop the tracing. */	tr->ctrl = 0;	trace->ctrl_update(tr);	ftrace_enabled = 0;	/* check the trace buffer */	ret = trace_test_buffer(tr, &count);	trace->reset(tr);	/* we should only have one item */	if (!ret && count != 1) {		printk(KERN_CONT ".. filter failed count=%ld ..", count);		ret = -1;		goto out;	} out:	ftrace_enabled = save_ftrace_enabled;	tracer_enabled = save_tracer_enabled;	/* Enable tracing on all functions again */	ftrace_set_filter(NULL, 0, 1);	return ret;}
开发者ID:mpalmer,项目名称:linux-2.6,代码行数:87,



注:本文中的trace_test_buffer函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ traceback函数代码示例
C++ trace_task_newtask函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。