lp:~stewart/libdrizzle/pahole

Created by Stewart Smith and last modified
Get this branch:
bzr branch lp:~stewart/libdrizzle/pahole
Only Stewart Smith can upload to this branch. If you are Stewart Smith please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Stewart Smith
Project:
Drizzle Client & Protocol Library
Status:
Merged

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 */

89. By Eric Day

Merged Eric.

88. By Eric Day

Merged Lenz's pkg updates.

87. By Eric Day

Merged Eric.

86. By Eric Day

Merged Eric.

85. By Eric Day

Merged Eric.

84. By Eric Day

Merged Eric.

83. By Eric Day

Merged Eric.

82. By Eric Day

Merged Eric.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar RepositoryFormatKnitPack6 (bzr 1.9)
Stacked on:
lp:~drizzle-trunk/libdrizzle/classic
This branch contains Public information 
Everyone can see this information.

Subscribers