public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/26012] New: abidiff: do not emit qualified name for data members
@ 2020-05-18 20:04 maennich at android dot com
  2021-01-26 13:14 ` [Bug default/26012] " gprocida+abigail at google dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: maennich at android dot com @ 2020-05-18 20:04 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=26012

            Bug ID: 26012
           Summary: abidiff: do not emit qualified name for data members
           Product: libabigail
           Version: unspecified
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: maennich at android dot com
                CC: libabigail at sourceware dot org
  Target Milestone: ---

When reporting differences concerning data members of structs/classes, we do
not need to report the fully qualified name as the containing block already
states the name and fully qualified members repeat that portion of the name
only.


E.g. we can reduce 


'struct task_struct at sched.h:635:1' changed:
  type size hasn't changed
  1 data member insertion:
    'unsigned int task_struct::in_ubsan', at offset 16704 (in bits) at
sched.h:1006:1
  there are data member changes:
    'void* task_struct::journal_info' offset changed from 16704 to 16768 (in
bits) (by +64 bits)
    'bio_list* task_struct::bio_list' offset changed from 16768 to 16832 (in
bits) (by +64 bits)
    'blk_plug* task_struct::plug' offset changed from 16832 to 16896 (in bits)
(by +64 bits)
    'reclaim_state* task_struct::reclaim_state' offset changed from 16896 to
16960 (in bits) (by +64 bits)
    'backing_dev_info* task_struct::backing_dev_info' offset changed from 16960
to 17024 (in bits) (by +64 bits)
    'io_context* task_struct::io_context' offset changed from 17024 to 17088
(in bits) (by +64 bits)
    'capture_control* task_struct::capture_control' offset changed from 17088
to 17152 (in bits) (by +64 bits)
    'unsigned long int task_struct::ptrace_message' offset changed from 17152
to 17216 (in bits) (by +64 bits)
    'kernel_siginfo_t* task_struct::last_siginfo' offset changed from 17216 to
17280 (in bits) (by +64 bits)


to

'struct task_struct at sched.h:635:1' changed:
  type size hasn't changed
  1 data member insertion:
    'in_ubsan', at offset 16704 (in bits) at sched.h:1006:1
  there are data member changes:
    'journal_info' offset changed from 16704 to 16768 (in bits) (by +64 bits)
    'bio_list' offset changed from 16768 to 16832 (in bits) (by +64 bits)
    'plug' offset changed from 16832 to 16896 (in bits) (by +64 bits)
    'reclaim_state' offset changed from 16896 to 16960 (in bits) (by +64 bits)
    'backing_dev_info' offset changed from 16960 to 17024 (in bits) (by +64
bits)
    'io_context' offset changed from 17024 to 17088 (in bits) (by +64 bits)
    'capture_control' offset changed from 17088 to 17152 (in bits) (by +64
bits)
    'ptrace_message' offset changed from 17152 to 17216 (in bits) (by +64 bits)
    'last_siginfo' offset changed from 17216 to 17280 (in bits) (by +64 bits)


I think this very much applies to C structs as well as to C++
structs/class and maybe more similar language constructs of other
languages. In fact, the above is a C example. I think we should use the
non-qualified version if we are in a nested block where the rest of the
qualified name is already emitted. In the above example, we are in the
block of 'task_struct' differences, hence we can strip that part away
from task_struct::in_ubsan'.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug default/26012] abidiff: do not emit qualified name for data members
  2020-05-18 20:04 [Bug default/26012] New: abidiff: do not emit qualified name for data members maennich at android dot com
@ 2021-01-26 13:14 ` gprocida+abigail at google dot com
  2021-02-08 13:14   ` Dodji Seketeli
  2021-02-03 17:53 ` gprocida+abigail at google dot com
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: gprocida+abigail at google dot com @ 2021-01-26 13:14 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=26012

Giuliano Procida <gprocida+abigail at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gprocida+abigail at google dot com

--- Comment #1 from Giuliano Procida <gprocida+abigail at google dot com> ---
Dodji, how would you feel about an intermediate stage where the types are
retained, but the redundant qualification is eliminated?

'struct task_struct at sched.h:635:1' changed:
  type size hasn't changed
  1 data member insertion:
    'unsigned int in_ubsan', at offset 16704 (in bits) at sched.h:1006:1
  there are data member changes:
    'void* journal_info' offset changed from 16704 to 16768 (in bits) (by +64
bits)
    'bio_list* bio_list' offset changed from 16768 to 16832 (in bits) (by +64
bits)
    'blk_plug* plug' offset changed from 16832 to 16896 (in bits) (by +64 bits)
    'reclaim_state* reclaim_state' offset changed from 16896 to 16960 (in bits)
(by +64 bits)
    'backing_dev_info* backing_dev_info' offset changed from 16960 to 17024 (in
bits) (by +64 bits)
    'io_context* io_context' offset changed from 17024 to 17088 (in bits) (by
+64 bits)
    'capture_control* capture_control' offset changed from 17088 to 17152 (in
bits) (by +64 bits)
    'unsigned long int ptrace_message' offset changed from 17152 to 17216 (in
bits) (by +64 bits)
    'kernel_siginfo_t* last_siginfo' offset changed from 17216 to 17280 (in
bits) (by +64 bits)

Giuliano.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug default/26012] abidiff: do not emit qualified name for data members
  2020-05-18 20:04 [Bug default/26012] New: abidiff: do not emit qualified name for data members maennich at android dot com
  2021-01-26 13:14 ` [Bug default/26012] " gprocida+abigail at google dot com
@ 2021-02-03 17:53 ` gprocida+abigail at google dot com
  2021-02-08 13:14 ` dodji at seketeli dot org
  2021-02-09 10:47 ` dodji at redhat dot com
  3 siblings, 0 replies; 6+ messages in thread
From: gprocida+abigail at google dot com @ 2021-02-03 17:53 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=26012

--- Comment #2 from Giuliano Procida <gprocida+abigail at google dot com> ---
Patch to remove redundant qualification is here:
https://sourceware.org/pipermail/libabigail/2021q1/003087.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Bug default/26012] abidiff: do not emit qualified name for data members
  2021-01-26 13:14 ` [Bug default/26012] " gprocida+abigail at google dot com
@ 2021-02-08 13:14   ` Dodji Seketeli
  0 siblings, 0 replies; 6+ messages in thread
From: Dodji Seketeli @ 2021-02-08 13:14 UTC (permalink / raw)
  To: gprocida+abigail at google dot com; +Cc: libabigail

Hello,

gprocida+abigail at google dot com via Libabigail
<libabigail@sourceware.org> a écrit:

> https://sourceware.org/bugzilla/show_bug.cgi?id=26012
>
> Giuliano Procida <gprocida+abigail at google dot com> changed:
>
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |gprocida+abigail at google dot com
>
> --- Comment #1 from Giuliano Procida <gprocida+abigail at google dot com> ---
> Dodji, how would you feel about an intermediate stage where the types are
> retained, but the redundant qualification is eliminated?

I like the idea!

> 'struct task_struct at sched.h:635:1' changed:
>   type size hasn't changed
>   1 data member insertion:
>     'unsigned int in_ubsan', at offset 16704 (in bits) at sched.h:1006:1
>   there are data member changes:
>     'void* journal_info' offset changed from 16704 to 16768 (in bits) (by +64
> bits)
>     'bio_list* bio_list' offset changed from 16768 to 16832 (in bits) (by +64
> bits)
>     'blk_plug* plug' offset changed from 16832 to 16896 (in bits) (by +64 bits)
>     'reclaim_state* reclaim_state' offset changed from 16896 to 16960 (in bits)
> (by +64 bits)
>     'backing_dev_info* backing_dev_info' offset changed from 16960 to 17024 (in
> bits) (by +64 bits)
>     'io_context* io_context' offset changed from 17024 to 17088 (in bits) (by
> +64 bits)
>     'capture_control* capture_control' offset changed from 17088 to 17152 (in
> bits) (by +64 bits)
>     'unsigned long int ptrace_message' offset changed from 17152 to 17216 (in
> bits) (by +64 bits)
>     'kernel_siginfo_t* last_siginfo' offset changed from 17216 to 17280 (in
> bits) (by +64 bits)

And I like the output as well.  I think it's perfect.

Thanks.

Cheers,

-- 
		Dodji

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug default/26012] abidiff: do not emit qualified name for data members
  2020-05-18 20:04 [Bug default/26012] New: abidiff: do not emit qualified name for data members maennich at android dot com
  2021-01-26 13:14 ` [Bug default/26012] " gprocida+abigail at google dot com
  2021-02-03 17:53 ` gprocida+abigail at google dot com
@ 2021-02-08 13:14 ` dodji at seketeli dot org
  2021-02-09 10:47 ` dodji at redhat dot com
  3 siblings, 0 replies; 6+ messages in thread
From: dodji at seketeli dot org @ 2021-02-08 13:14 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=26012

--- Comment #3 from dodji at seketeli dot org ---
Hello,

gprocida+abigail at google dot com via Libabigail
<libabigail@sourceware.org> a écrit:

> https://sourceware.org/bugzilla/show_bug.cgi?id=26012
>
> Giuliano Procida <gprocida+abigail at google dot com> changed:
>
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |gprocida+abigail at google dot com
>
> --- Comment #1 from Giuliano Procida <gprocida+abigail at google dot com> ---
> Dodji, how would you feel about an intermediate stage where the types are
> retained, but the redundant qualification is eliminated?

I like the idea!

> 'struct task_struct at sched.h:635:1' changed:
>   type size hasn't changed
>   1 data member insertion:
>     'unsigned int in_ubsan', at offset 16704 (in bits) at sched.h:1006:1
>   there are data member changes:
>     'void* journal_info' offset changed from 16704 to 16768 (in bits) (by +64
> bits)
>     'bio_list* bio_list' offset changed from 16768 to 16832 (in bits) (by +64
> bits)
>     'blk_plug* plug' offset changed from 16832 to 16896 (in bits) (by +64 bits)
>     'reclaim_state* reclaim_state' offset changed from 16896 to 16960 (in bits)
> (by +64 bits)
>     'backing_dev_info* backing_dev_info' offset changed from 16960 to 17024 (in
> bits) (by +64 bits)
>     'io_context* io_context' offset changed from 17024 to 17088 (in bits) (by
> +64 bits)
>     'capture_control* capture_control' offset changed from 17088 to 17152 (in
> bits) (by +64 bits)
>     'unsigned long int ptrace_message' offset changed from 17152 to 17216 (in
> bits) (by +64 bits)
>     'kernel_siginfo_t* last_siginfo' offset changed from 17216 to 17280 (in
> bits) (by +64 bits)

And I like the output as well.  I think it's perfect.

Thanks.

Cheers,

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug default/26012] abidiff: do not emit qualified name for data members
  2020-05-18 20:04 [Bug default/26012] New: abidiff: do not emit qualified name for data members maennich at android dot com
                   ` (2 preceding siblings ...)
  2021-02-08 13:14 ` dodji at seketeli dot org
@ 2021-02-09 10:47 ` dodji at redhat dot com
  3 siblings, 0 replies; 6+ messages in thread
From: dodji at redhat dot com @ 2021-02-09 10:47 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=26012

dodji at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #4 from dodji at redhat dot com ---
As your patch has been applied to mainline at
https://sourceware.org/git/?p=libabigail.git;a=commit;h=89de572d7bc489ebd8619069d36c81d162457487,
I guess we can now close this enhancement request.

Thank you all for working on this!

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-09 10:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-18 20:04 [Bug default/26012] New: abidiff: do not emit qualified name for data members maennich at android dot com
2021-01-26 13:14 ` [Bug default/26012] " gprocida+abigail at google dot com
2021-02-08 13:14   ` Dodji Seketeli
2021-02-03 17:53 ` gprocida+abigail at google dot com
2021-02-08 13:14 ` dodji at seketeli dot org
2021-02-09 10:47 ` dodji at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).