diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2021-02-05 13:15:23 +0200 |
---|---|---|
committer | Xavi Hernandez <xhernandez@users.noreply.github.com> | 2021-02-08 13:51:47 +0100 |
commit | b818cdde534743fccca5cd91b4a7298e2d0d601e (patch) | |
tree | e1c02a8a5c46fad5ed8d9ba24bfc0212169b36b5 /xlators | |
parent | 00f141018f23d05703c8e3a730bb5134f95e6b60 (diff) | |
download | glusterfs-b818cdde534743fccca5cd91b4a7298e2d0d601e.tar.gz glusterfs-b818cdde534743fccca5cd91b4a7298e2d0d601e.tar.xz glusterfs-b818cdde534743fccca5cd91b4a7298e2d0d601e.zip |
stack.h/c: remove unused variable and reorder struct
- Removed unused ref_count variable
- Reordered the struct to get related variables closer together.
- Changed 'complete' from a '_Bool' to a 'int32_t'
Before:
```
struct _call_frame {
call_stack_t * root; /* 0 8 */
call_frame_t * parent; /* 8 8 */
struct list_head frames; /* 16 16 */
void * local; /* 32 8 */
xlator_t * this; /* 40 8 */
ret_fn_t ret; /* 48 8 */
int32_t ref_count; /* 56 4 */
/* XXX 4 bytes hole, try to pack */
/* --- cacheline 1 boundary (64 bytes) --- */
gf_lock_t lock; /* 64 40 */
void * cookie; /* 104 8 */
_Bool complete; /* 112 1 */
/* XXX 3 bytes hole, try to pack */
glusterfs_fop_t op; /* 116 4 */
struct timespec begin; /* 120 16 */
/* --- cacheline 2 boundary (128 bytes) was 8 bytes ago --- */
struct timespec end; /* 136 16 */
const char * wind_from; /* 152 8 */
const char * wind_to; /* 160 8 */
const char * unwind_from; /* 168 8 */
const char * unwind_to; /* 176 8 */
/* size: 184, cachelines: 3, members: 17 */
/* sum members: 177, holes: 2, sum holes: 7 */
/* last cacheline: 56 bytes */
```
After:
```
struct _call_frame {
call_stack_t * root; /* 0 8 */
call_frame_t * parent; /* 8 8 */
struct list_head frames; /* 16 16 */
struct timespec begin; /* 32 16 */
struct timespec end; /* 48 16 */
/* --- cacheline 1 boundary (64 bytes) --- */
void * local; /* 64 8 */
gf_lock_t lock; /* 72 40 */
void * cookie; /* 112 8 */
xlator_t * this; /* 120 8 */
/* --- cacheline 2 boundary (128 bytes) --- */
ret_fn_t ret; /* 128 8 */
glusterfs_fop_t op; /* 136 4 */
int32_t complete; /* 140 4 */
const char * wind_from; /* 144 8 */
const char * wind_to; /* 152 8 */
const char * unwind_from; /* 160 8 */
const char * unwind_to; /* 168 8 */
/* size: 176, cachelines: 3, members: 16 */
/* last cacheline: 48 bytes */
```
Fixes: #2130
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/meta/src/frames-file.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/xlators/meta/src/frames-file.c b/xlators/meta/src/frames-file.c index 9a13db9a93..1e39350ece 100644 --- a/xlators/meta/src/frames-file.c +++ b/xlators/meta/src/frames-file.c @@ -50,8 +50,6 @@ frames_file_fill(xlator_t *this, inode_t *file, strfd_t *strfd) strprintf(strfd, "\t\t\t\"Creation_time\": %d.%09d,\n", (int)frame->begin.tv_sec, (int)frame->begin.tv_nsec); - strprintf(strfd, " \t\t\t\"Refcount\": %d,\n", - frame->ref_count); if (frame->parent) strprintf(strfd, "\t\t\t\"Parent\": \"%s\",\n", frame->parent->this->name); |