Revision 90f59ee41abf587ad4675a70434136c8707fdf4b authored by Daniel Bristot de Oliveira on 18 February 2022, 17:57:09 UTC, committed by Steven Rostedt (Google) on 26 February 2022, 02:05:30 UTC
When a trace instance creation fails, tools are printing:

	Could not enable -> osnoiser <- tracer for tracing

Print the actual (and correct) name of the tracer it fails to enable.

Link: https://lkml.kernel.org/r/53ef0582605af91eca14b19dba9fc9febb95d4f9.1645206561.git.bristot@kernel.org

Fixes: b1696371d865 ("rtla: Helper functions for rtla")
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent 316f710
Raw File
test_free_pages.c
// SPDX-License-Identifier: GPL-2.0+
/*
 * test_free_pages.c: Check that free_pages() doesn't leak memory
 * Copyright (c) 2020 Oracle
 * Author: Matthew Wilcox <willy@infradead.org>
 */

#define pr_fmt(fmt)	KBUILD_MODNAME ": " fmt

#include <linux/gfp.h>
#include <linux/mm.h>
#include <linux/module.h>

static void test_free_pages(gfp_t gfp)
{
	unsigned int i;

	for (i = 0; i < 1000 * 1000; i++) {
		unsigned long addr = __get_free_pages(gfp, 3);
		struct page *page = virt_to_page(addr);

		/* Simulate page cache getting a speculative reference */
		get_page(page);
		free_pages(addr, 3);
		put_page(page);
	}
}

static int m_in(void)
{
	pr_info("Testing with GFP_KERNEL\n");
	test_free_pages(GFP_KERNEL);
	pr_info("Testing with GFP_KERNEL | __GFP_COMP\n");
	test_free_pages(GFP_KERNEL | __GFP_COMP);
	pr_info("Test completed\n");

	return 0;
}

static void m_ex(void)
{
}

module_init(m_in);
module_exit(m_ex);
MODULE_AUTHOR("Matthew Wilcox <willy@infradead.org>");
MODULE_LICENSE("GPL");
back to top