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

Re: [Xen-devel] [PATCH 1/3] xen: move debugtrace coding to common/debugtrace.c


  • To: Juergen Gross <JGross@xxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Mon, 29 Jul 2019 14:00:05 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gdltsNFbWtaWIG+wgiEMpgh/57m8Og8VZt5cnW6xZg8=; b=HuzuQ1myxOh6rc+ybSjwBN2gG+joknZZCrS0rC0ehBpEQpfUGGU5/jbRo8k4L74j2IADnbyqiNSO0TrZ2/7Pw/E3lmIO54A9kTBysdpuHfivLb2bNWRq60Tu5a/rMTakMomBb1UmT0fUvZWpN9iJna2cA3MUIOkVcmIwKfDEtbipCi/dh4Roi8X1CXhQJ9QUNE0xJKVLS/4toEKNdatC2Ne9p+j1oDwAAh+GM75M/yAYM95gHr/HKEt7t8FKeqW/1VBW37RBuYVNDkUrUTNwHZ2pQdT9XwBm/grC/zDGRBchPXGOJjzPOyZ7Q7GkpSHC4pli2ac94JDi42vLwkFmVg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ct15zKb6tjbTunvRemFJ84tZ2Gf67BxHb2DS48fQojo7Llpw7O56agILoSfIVDAedrCNQv2AZF4ikipYkcLa0xBzbnbDD8v1FY7IMSYEg03e/5nVszBiHbfxQVE3xLbfnIE2ODJhkp3qlQ6XDwOlVMFFoC1/8W3d/rPgmSSQ4gE8WfpzPRQRCaTkitXaD989w0aQ6eJxtOV85Io2/6kAbElvbDsLNaAJ4heCXX6ERnEZEBnFheRyVRGnnP/v08CM8wBTA6pFrZJoBxVrazvqY6QK/+jbJlXJkWQROc/TPs5QdVdMxcKUx5tI3fjrYzV+74VvsFTan5U10VOt2K9b1Q==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 29 Jul 2019 14:16:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVRSA2vhgAAF6AnUuE4HJXiRUWH6bhjJWAgAAM8DaAAAgJgA==
  • Thread-topic: [PATCH 1/3] xen: move debugtrace coding to common/debugtrace.c

On 29.07.2019 15:30, Juergen Gross wrote:
> On 29.07.19 14:45, Jan Beulich wrote:
>> On 28.07.2019 10:40, Juergen Gross wrote:
>>> -#endif /* !CONFIG_DEBUG_TRACE */
>>> -
>>> -
>>>    /*
>>>     * **************************************************************
>>>     * *************** Debugging/tracing/error-report ***************
>>
>> ... what about this one? There's only panic() between it and the next
>> such comment, and I don't think the "Debugging/tracing" part of it
>> are applicable (anymore).
> 
> True. I'll remove the "Debugging/tracing" part.
> 
>>
>>> --- a/xen/include/xen/console.h
>>> +++ b/xen/include/xen/console.h
>>> @@ -48,4 +48,8 @@ int console_resume(void);
>>>    extern int8_t opt_console_xen;
>>> +/* Issue string via serial line. */
>>> +extern int sercon_handle;
>>> +void sercon_puts(const char *s);
>>
>> I guess avoiding their exposure was one of the reasons the debug trace
>> code lived in the place you move it from. I'm unconvinced non-console
>> code is actually supposed to make use of either, but I'm not opposed
>> enough to nak the change. I don't think though the comment fits well
>> with the variable declaration.
> 
> sercon_handle is used for calling serial_puts(), so maybe instead of
> directly using serial_puts() with sercon_handle I should add a wrapper
> to console.c (e.g. console_serial_puts())? It should be noted that
> serial_puts() is called only in case of debugtrace output toggled to go
> to the console. I guess using serial_puts() in that case is meant to
> avoid too many software layers when doing the output.

Hmm, I'd rather expect this to be used to avoid doing anything else
sercon_puts() does besides calling serial_puts(). These other steps
are also why I think this is to remain a console internal interface.

> It would be
> possible to use sercon_puts() for that case, too, resulting in the
> inability to use debugtrace_printk() in the then additionally needed
> paths (or better: to use it with output redirected to console).
> 
> sercon_puts() could use another wrapper, e.g. console_debug_puts().
> 
> Would you like that better?

Probably not. I wonder whether splitting out this code is really a
good step.

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®.