perf tools: Elliminate alignment holes

perf_evsel:

Before:

	/* size: 320, cachelines: 5, members: 35 */
	/* sum members: 304, holes: 3, sum holes: 16 */

After:

	/* size: 304, cachelines: 5, members: 35 */
	/* last cacheline: 48 bytes */

perf_evlist:

Before:

	/* size: 2544, cachelines: 40, members: 17 */
	/* sum members: 2533, holes: 2, sum holes: 11 */
	/* last cacheline: 48 bytes */

After:

	/* size: 2536, cachelines: 40, members: 17 */
	/* sum members: 2533, holes: 1, sum holes: 3 */
	/* last cacheline: 40 bytes */

timechart:

Before:

	/* size: 288, cachelines: 5, members: 21 */
	/* sum members: 271, holes: 2, sum holes: 10 */
	/* padding: 7 */
	/* last cacheline: 32 bytes */

After:

	/* size: 272, cachelines: 5, members: 21 */
	/* sum members: 271, holes: 1, sum holes: 1 */
	/* last cacheline: 16 bytes */

thread:

Before:

	/* size: 112, cachelines: 2, members: 15 */
	/* sum members: 101, holes: 2, sum holes: 11 */
	/* last cacheline: 48 bytes */

After:

	/* size: 104, cachelines: 2, members: 15 */
	/* sum members: 101, holes: 1, sum holes: 3 */
	/* last cacheline: 40 bytes */

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-a543w7zjl9yyrg9nkf1teukp@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 70ba6b8f
...@@ -61,13 +61,13 @@ struct timechart { ...@@ -61,13 +61,13 @@ struct timechart {
tasks_only, tasks_only,
with_backtrace, with_backtrace,
topology; topology;
bool force;
/* IO related settings */ /* IO related settings */
u64 io_events;
bool io_only, bool io_only,
skip_eagain; skip_eagain;
u64 io_events;
u64 min_time, u64 min_time,
merge_dist; merge_dist;
bool force;
}; };
struct per_pidcomm; struct per_pidcomm;
......
...@@ -40,6 +40,7 @@ struct perf_evlist { ...@@ -40,6 +40,7 @@ struct perf_evlist {
int nr_entries; int nr_entries;
int nr_groups; int nr_groups;
int nr_mmaps; int nr_mmaps;
bool overwrite;
size_t mmap_len; size_t mmap_len;
int id_pos; int id_pos;
int is_pos; int is_pos;
...@@ -48,7 +49,6 @@ struct perf_evlist { ...@@ -48,7 +49,6 @@ struct perf_evlist {
int cork_fd; int cork_fd;
pid_t pid; pid_t pid;
} workload; } workload;
bool overwrite;
struct fdarray pollfd; struct fdarray pollfd;
struct perf_mmap *mmap; struct perf_mmap *mmap;
struct thread_map *threads; struct thread_map *threads;
......
...@@ -73,7 +73,6 @@ struct perf_evsel { ...@@ -73,7 +73,6 @@ struct perf_evsel {
char *name; char *name;
double scale; double scale;
const char *unit; const char *unit;
bool snapshot;
struct event_format *tp_format; struct event_format *tp_format;
union { union {
void *priv; void *priv;
...@@ -86,6 +85,7 @@ struct perf_evsel { ...@@ -86,6 +85,7 @@ struct perf_evsel {
unsigned int sample_size; unsigned int sample_size;
int id_pos; int id_pos;
int is_pos; int is_pos;
bool snapshot;
bool supported; bool supported;
bool needs_swap; bool needs_swap;
bool no_aux_samples; bool no_aux_samples;
...@@ -93,11 +93,11 @@ struct perf_evsel { ...@@ -93,11 +93,11 @@ struct perf_evsel {
bool system_wide; bool system_wide;
bool tracking; bool tracking;
bool per_pkg; bool per_pkg;
unsigned long *per_pkg_mask;
/* parse modifier helper */ /* parse modifier helper */
int exclude_GH; int exclude_GH;
int nr_members; int nr_members;
int sample_read; int sample_read;
unsigned long *per_pkg_mask;
struct perf_evsel *leader; struct perf_evsel *leader;
char *group_name; char *group_name;
}; };
......
...@@ -25,9 +25,9 @@ struct thread { ...@@ -25,9 +25,9 @@ struct thread {
atomic_t refcnt; atomic_t refcnt;
char shortname[3]; char shortname[3];
bool comm_set; bool comm_set;
int comm_len;
bool dead; /* if set thread has exited */ bool dead; /* if set thread has exited */
struct list_head comm_list; struct list_head comm_list;
int comm_len;
u64 db_id; u64 db_id;
void *priv; void *priv;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment