lp:~stewart/libdrizzle/pahole
- Get this branch:
- bzr branch lp:~stewart/libdrizzle/pahole
Branch merges
- Eric Day: Pending requested
- Diff: None lines
Branch information
Recent revisions
- 91. By Stewart Smith
-
Re-arrange drizzle_st for better cache alignment.
Before:
struct drizzle_st {
drizzle_ options_ t options; /* 0 4 */ /* XXX 4 bytes hole, try to pack */
drizzle_ con_st * con_list; /* 8 8 */
uint32_t con_count; /* 16 4 *//* XXX 4 bytes hole, try to pack */
drizzle_ con_st * con_ready; /* 24 8 */
struct pollfd * pfds; /* 32 8 */
uint32_t pfds_size; /* 40 4 */
int last_errno; /* 44 4 */
char last_error[2048]; /* 48 2048 */
/* --- cacheline 32 boundary (2048 bytes) was 48 bytes ago --- */
uint16_t error_code; /* 2096 2 */
char sqlstate[6]; /* 2098 6 */
drizzle_ query_st * query_list; /* 2104 8 */
/* --- cacheline 33 boundary (2112 bytes) --- */
uint32_t query_count; /* 2112 4 */
uint32_t query_new; /* 2116 4 */
uint32_t query_running; /* 2120 4 *//* size: 2128, cachelines: 34 */
/* sum members: 2116, holes: 2, sum holes: 8 */
/* padding: 4 */
/* last cacheline: 16 bytes */
}; /* definitions: 11 */AFTER:
uint16_t error_code; /* 60 2 */
char sqlstate[6]; /* 62 6 */
/* --- cacheline 1 boundary (64 bytes) was 4 bytes ago --- */
char last_error[2048]; /* 68 2048 */
/* --- cacheline 33 boundary (2112 bytes) was 4 bytes ago --- *//* size: 2120, cachelines: 34 */
/* padding: 4 */
/* last cacheline: 8 bytes */
}; /* definitions: 11 */ - 90. By Stewart Smith
-
Improve drizzle_con_st by removing holes inserted for alignment.
Before, pahole showing:
drizzle_ con_options_ t options; /* 24 4 */ /* XXX 4 bytes hole, try to pack */
drizzle_ result_ st * result_list; /* 32 8 */
uint32_t result_count; /* 40 4 *//* XXX 4 bytes hole, try to pack */
For a total of:
/* size: 34448, cachelines: 539 */
/* sum members: 34421, holes: 9, sum holes: 27 */
/* last cacheline: 16 bytes */
}; /* definitions: 11 */Now, no hole and:
/* size: 34440, cachelines: 539 */
/* sum members: 34421, holes: 7, sum holes: 19 */
/* last cacheline: 8 bytes */
}; /* definitions: 11 */
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar RepositoryFormatKnitPack6 (bzr 1.9)
- Stacked on:
- lp:~drizzle-trunk/libdrizzle/classic