diff mbox

x86/mm: drop pointless use of __FUNCTION__

Message ID 57BD706502000078001087A9@prv-mh.provo.novell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Beulich Aug. 24, 2016, 8:01 a.m. UTC
Non-debugging message text should be (and is here) distinguishable
without also logging function names.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
x86/mm: drop pointless use of __FUNCTION__

Non-debugging message text should be (and is here) distinguishable
without also logging function names.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/mm/paging.c
+++ b/xen/arch/x86/mm/paging.c
@@ -469,8 +469,9 @@ static int paging_log_dirty_op(struct do
         peek = 0;
 
     if ( unlikely(d->arch.paging.log_dirty.failed_allocs) ) {
-        printk("%s: %d failed page allocs while logging dirty pages\n",
-               __FUNCTION__, d->arch.paging.log_dirty.failed_allocs);
+        printk(XENLOG_WARNING
+               "%u failed page allocs while logging dirty pages of Dom%d\n",
+               d->arch.paging.log_dirty.failed_allocs, d->domain_id);
         rv = -ENOMEM;
         goto out;
     }

Comments

Konrad Rzeszutek Wilk Aug. 24, 2016, 8:37 p.m. UTC | #1
On Wed, Aug 24, 2016 at 02:01:09AM -0600, Jan Beulich wrote:
> Non-debugging message text should be (and is here) distinguishable
> without also logging function names.

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> --- a/xen/arch/x86/mm/paging.c
> +++ b/xen/arch/x86/mm/paging.c
> @@ -469,8 +469,9 @@ static int paging_log_dirty_op(struct do
>          peek = 0;
>  
>      if ( unlikely(d->arch.paging.log_dirty.failed_allocs) ) {
> -        printk("%s: %d failed page allocs while logging dirty pages\n",
> -               __FUNCTION__, d->arch.paging.log_dirty.failed_allocs);
> +        printk(XENLOG_WARNING
> +               "%u failed page allocs while logging dirty pages of Dom%d\n",
> +               d->arch.paging.log_dirty.failed_allocs, d->domain_id);
>          rv = -ENOMEM;
>          goto out;
>      }
Andrew Cooper Aug. 31, 2016, 6:39 p.m. UTC | #2
On 24/08/16 09:01, Jan Beulich wrote:
> Non-debugging message text should be (and is here) distinguishable
> without also logging function names.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> --- a/xen/arch/x86/mm/paging.c
> +++ b/xen/arch/x86/mm/paging.c
> @@ -469,8 +469,9 @@ static int paging_log_dirty_op(struct do
>          peek = 0;
>  
>      if ( unlikely(d->arch.paging.log_dirty.failed_allocs) ) {
> -        printk("%s: %d failed page allocs while logging dirty pages\n",
> -               __FUNCTION__, d->arch.paging.log_dirty.failed_allocs);
> +        printk(XENLOG_WARNING
> +               "%u failed page allocs while logging dirty pages of Dom%d\n",
> +               d->arch.paging.log_dirty.failed_allocs, d->domain_id);

Can we standardise on d%d instead?  It is shorter, and mutually
consistent with d%dv%d for vcpus.

~Andrew
Jan Beulich Sept. 1, 2016, 7:13 a.m. UTC | #3
>>> On 31.08.16 at 20:39, <andrew.cooper3@citrix.com> wrote:
> On 24/08/16 09:01, Jan Beulich wrote:
>> Non-debugging message text should be (and is here) distinguishable
>> without also logging function names.
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>
>> --- a/xen/arch/x86/mm/paging.c
>> +++ b/xen/arch/x86/mm/paging.c
>> @@ -469,8 +469,9 @@ static int paging_log_dirty_op(struct do
>>          peek = 0;
>>  
>>      if ( unlikely(d->arch.paging.log_dirty.failed_allocs) ) {
>> -        printk("%s: %d failed page allocs while logging dirty pages\n",
>> -               __FUNCTION__, d->arch.paging.log_dirty.failed_allocs);
>> +        printk(XENLOG_WARNING
>> +               "%u failed page allocs while logging dirty pages of Dom%d\n",
>> +               d->arch.paging.log_dirty.failed_allocs, d->domain_id);
> 
> Can we standardise on d%d instead?  It is shorter, and mutually
> consistent with d%dv%d for vcpus.

Fine with me - done.

Jan
Andrew Cooper Sept. 1, 2016, 9:52 a.m. UTC | #4
On 01/09/16 08:13, Jan Beulich wrote:
>>>> On 31.08.16 at 20:39, <andrew.cooper3@citrix.com> wrote:
>> On 24/08/16 09:01, Jan Beulich wrote:
>>> Non-debugging message text should be (and is here) distinguishable
>>> without also logging function names.
>>>
>>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>>
>>> --- a/xen/arch/x86/mm/paging.c
>>> +++ b/xen/arch/x86/mm/paging.c
>>> @@ -469,8 +469,9 @@ static int paging_log_dirty_op(struct do
>>>          peek = 0;
>>>  
>>>      if ( unlikely(d->arch.paging.log_dirty.failed_allocs) ) {
>>> -        printk("%s: %d failed page allocs while logging dirty pages\n",
>>> -               __FUNCTION__, d->arch.paging.log_dirty.failed_allocs);
>>> +        printk(XENLOG_WARNING
>>> +               "%u failed page allocs while logging dirty pages of Dom%d\n",
>>> +               d->arch.paging.log_dirty.failed_allocs, d->domain_id);
>> Can we standardise on d%d instead?  It is shorter, and mutually
>> consistent with d%dv%d for vcpus.
> Fine with me - done.

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
George Dunlap Sept. 2, 2016, 10:52 a.m. UTC | #5
On Wed, Aug 24, 2016 at 9:01 AM, Jan Beulich <JBeulich@suse.com> wrote:
> Non-debugging message text should be (and is here) distinguishable
> without also logging function names.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: George Dunlap <george.dunlap@citrix.com>

>
> --- a/xen/arch/x86/mm/paging.c
> +++ b/xen/arch/x86/mm/paging.c
> @@ -469,8 +469,9 @@ static int paging_log_dirty_op(struct do
>          peek = 0;
>
>      if ( unlikely(d->arch.paging.log_dirty.failed_allocs) ) {
> -        printk("%s: %d failed page allocs while logging dirty pages\n",
> -               __FUNCTION__, d->arch.paging.log_dirty.failed_allocs);
> +        printk(XENLOG_WARNING
> +               "%u failed page allocs while logging dirty pages of Dom%d\n",
> +               d->arch.paging.log_dirty.failed_allocs, d->domain_id);
>          rv = -ENOMEM;
>          goto out;
>      }
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> https://lists.xen.org/xen-devel
>
diff mbox

Patch

--- a/xen/arch/x86/mm/paging.c
+++ b/xen/arch/x86/mm/paging.c
@@ -469,8 +469,9 @@  static int paging_log_dirty_op(struct do
         peek = 0;
 
     if ( unlikely(d->arch.paging.log_dirty.failed_allocs) ) {
-        printk("%s: %d failed page allocs while logging dirty pages\n",
-               __FUNCTION__, d->arch.paging.log_dirty.failed_allocs);
+        printk(XENLOG_WARNING
+               "%u failed page allocs while logging dirty pages of Dom%d\n",
+               d->arch.paging.log_dirty.failed_allocs, d->domain_id);
         rv = -ENOMEM;
         goto out;
     }