[1/2] nptl: Remove unused members from struct pthread

Message ID 20220426180705.1274657-2-adhemerval.zanella@linaro.org
State Committed
Commit d55df811e95e6da6af4e414c3eef64546f8b4a2c
Delegated to: Arjun Shankar
Headers
Series Optimize struct pthread size |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Adhemerval Zanella Netto April 26, 2022, 6:07 p.m. UTC
  It removes both pid_ununsed and cpuclock_offset_ununsed, saving about
12 bytes from struct pthread.
---
 nptl/descr.h | 7 -------
 1 file changed, 7 deletions(-)
  

Comments

Arjun Shankar June 28, 2022, 5:26 p.m. UTC | #1
Hi Adhemerval,

This looks good to me.

Reviewed-by: Arjun Shankar <arjun@redhat.com>

> It removes both pid_ununsed and cpuclock_offset_ununsed, saving about
> 12 bytes from struct pthread.
> ---
>  nptl/descr.h | 7 -------
>  1 file changed, 7 deletions(-)
>
> diff --git a/nptl/descr.h b/nptl/descr.h
> index bb46b5958e..b5852632e3 100644
> --- a/nptl/descr.h
> +++ b/nptl/descr.h
> @@ -172,9 +172,6 @@ struct pthread
>       therefore stack) used' flag.  */
>    pid_t tid;
>
> -  /* Ununsed.  */
> -  pid_t pid_ununsed;
> -

OK. This has been unused since c579f48edba (2016).

>    /* List of robust mutexes the thread is holding.  */
>  #if __PTHREAD_MUTEX_HAVE_PREV
>    void *robust_prev;
> @@ -342,10 +339,6 @@ struct pthread
>    /* Lock for synchronizing setxid calls.  */
>    unsigned int setxid_futex;
>
> -#if HP_TIMING_INLINE
> -  hp_timing_t cpuclock_offset_ununsed;
> -#endif
> -

OK. This has been unused since 38cc11daa43 (2019).

>    /* If the thread waits to join another one the ID of the latter is
>       stored here.
>
> --
> 2.34.1
>
  

Patch

diff --git a/nptl/descr.h b/nptl/descr.h
index bb46b5958e..b5852632e3 100644
--- a/nptl/descr.h
+++ b/nptl/descr.h
@@ -172,9 +172,6 @@  struct pthread
      therefore stack) used' flag.  */
   pid_t tid;
 
-  /* Ununsed.  */
-  pid_t pid_ununsed;
-
   /* List of robust mutexes the thread is holding.  */
 #if __PTHREAD_MUTEX_HAVE_PREV
   void *robust_prev;
@@ -342,10 +339,6 @@  struct pthread
   /* Lock for synchronizing setxid calls.  */
   unsigned int setxid_futex;
 
-#if HP_TIMING_INLINE
-  hp_timing_t cpuclock_offset_ununsed;
-#endif
-
   /* If the thread waits to join another one the ID of the latter is
      stored here.