[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v5 2/4] xen: move debugtrace coding to common/debugtrace.c



On 05.09.2019 13:39, Juergen Gross wrote:
> --- /dev/null
> +++ b/xen/common/debugtrace.c
> @@ -0,0 +1,181 @@
> +/******************************************************************************
> + * debugtrace.c
> + *
> + * Debugtrace for Xen
> + */
> +
> +
> +#include <xen/console.h>
> +#include <xen/init.h>
> +#include <xen/keyhandler.h>
> +#include <xen/lib.h>
> +#include <xen/mm.h>
> +#include <xen/serial.h>
> +#include <xen/spinlock.h>
> +#include <xen/watchdog.h>
> +
> +#define DEBUG_TRACE_ENTRY_SIZE   1024
> +
> +/* Send output direct to console, or buffer it? */
> +static volatile int debugtrace_send_to_console;
> +
> +static char        *debugtrace_buf; /* Debug-trace buffer */
> +static unsigned int debugtrace_prd; /* Producer index     */
> +static unsigned int debugtrace_kilobytes = 128, debugtrace_bytes;
> +static unsigned int debugtrace_used;
> +static char debugtrace_last_entry_buf[DEBUG_TRACE_ENTRY_SIZE];
> +static DEFINE_SPINLOCK(debugtrace_lock);
> +integer_param("debugtrace", debugtrace_kilobytes);
> +
> +static void debugtrace_dump_worker(void)

And another remark here too, despite my prior ack: By moving this into
its own file, the debugtrace_ prefixes of static symbols now all
become redundant, at least as far as their occurrence in e.g. call
stacks goes (where they'd be prefixes by the disambiguating source
file name). But I know we've got ample other examples where this is
also the case, and I also know there are contrary opinions on the
matter, so this is not strictly a request for further change.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.