mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Let struct dump_config in objspace fit in a single cache line
Let dump_config boolean members roots and full_heap be bit flags instead Closes: https://github.com/ruby/ruby/pull/2274
This commit is contained in:
parent
e9907122ed
commit
612cad5d20
1 changed files with 3 additions and 3 deletions
|
@ -27,12 +27,12 @@ struct dump_config {
|
||||||
VALUE type;
|
VALUE type;
|
||||||
FILE *stream;
|
FILE *stream;
|
||||||
VALUE string;
|
VALUE string;
|
||||||
int roots;
|
|
||||||
const char *root_category;
|
const char *root_category;
|
||||||
VALUE cur_obj;
|
VALUE cur_obj;
|
||||||
VALUE cur_obj_klass;
|
VALUE cur_obj_klass;
|
||||||
size_t cur_obj_references;
|
size_t cur_obj_references;
|
||||||
int full_heap;
|
unsigned int roots: 1;
|
||||||
|
unsigned int full_heap: 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
PRINTF_ARGS(static void dump_append(struct dump_config *, const char *, ...), 2, 3);
|
PRINTF_ARGS(static void dump_append(struct dump_config *, const char *, ...), 2, 3);
|
||||||
|
@ -368,7 +368,7 @@ root_obj_i(const char *category, VALUE obj, void *data)
|
||||||
dump_append(dc, ", \"%#"PRIxVALUE"\"", obj);
|
dump_append(dc, ", \"%#"PRIxVALUE"\"", obj);
|
||||||
|
|
||||||
dc->root_category = category;
|
dc->root_category = category;
|
||||||
dc->roots++;
|
dc->roots = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue