Browse Source

defs.h: compact struct tcb a bit by moving currpers field

As reported by pahole, struct tcb has size of 328 bytes and 8 bytes
of holes on x86_64; by moving currpers after qual_flg, both holes are
leminated and the structure fits into 8 cache lines now.  This should
also benefit other 64-bit architectures.

* defs.h [SUPPORTED_PERSONALITIES > 1] (struct tcb): Move currpers field
after qual_flg field.
Eugene Syromyatnikov 1 month ago
parent
commit
49aa9bcfb3
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      defs.h

+ 3
- 3
defs.h View File

@@ -251,13 +251,13 @@ struct tcb {
251 251
 	int flags;		/* See below for TCB_ values */
252 252
 	int pid;		/* If 0, this tcb is free */
253 253
 	int qual_flg;		/* qual_flags[scno] or DEFAULT_QUAL_FLAGS + RAW */
254
+# if SUPPORTED_PERSONALITIES > 1
255
+	unsigned int currpers;	/* Personality at the time of scno update */
256
+# endif
254 257
 	unsigned long u_error;	/* Error code */
255 258
 	kernel_ulong_t scno;	/* System call number */
256 259
 	kernel_ulong_t u_arg[MAX_ARGS];	/* System call arguments */
257 260
 	kernel_long_t u_rval;	/* Return value */
258
-# if SUPPORTED_PERSONALITIES > 1
259
-	unsigned int currpers;	/* Personality at the time of scno update */
260
-# endif
261 261
 	int sys_func_rval;	/* Syscall entry parser's return value */
262 262
 	int curcol;		/* Output column for this process */
263 263
 	FILE *outf;		/* Output file for this process */

Loading…
Cancel
Save