Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "internal.h"
#include "ruby/debug.h"
#include "ruby/io.h"
#include "gc.h"
#include "node.h"
#include "vm_core.h"
#include "objspace.h"
Go to the source code of this file.
Data Structures | |
struct | dump_config |
Macros | |
#define | CASE_TYPE(type) case T_##type: return #type; break |
Functions | |
PRINTF_ARGS (static void dump_append(struct dump_config *, const char *,...), 2, 3) | |
static void | dump_append (struct dump_config *dc, const char *format,...) |
static void | dump_append_string_value (struct dump_config *dc, VALUE obj) |
static void | dump_append_symbol_value (struct dump_config *dc, VALUE obj) |
static const char * | obj_type (VALUE obj) |
static void | dump_append_special_const (struct dump_config *dc, VALUE value) |
static void | reachable_object_i (VALUE ref, void *data) |
static void | dump_append_string_content (struct dump_config *dc, VALUE obj) |
static void | dump_object (VALUE obj, struct dump_config *dc) |
static int | heap_i (void *vstart, void *vend, size_t stride, void *data) |
static void | root_obj_i (const char *category, VALUE obj, void *data) |
static VALUE | dump_output (struct dump_config *dc, VALUE opts, VALUE output, const char *filename) |
static VALUE | dump_result (struct dump_config *dc, VALUE output) |
static VALUE | objspace_dump (int argc, VALUE *argv, VALUE os) |
static VALUE | objspace_dump_all (int argc, VALUE *argv, VALUE os) |
void | Init_objspace_dump (VALUE rb_mObjSpace) |
Variables | |
static VALUE | sym_output |
static VALUE | sym_stdout |
static VALUE | sym_string |
static VALUE | sym_file |
#define CASE_TYPE | ( | type | ) | case T_##type: return #type; break |
Referenced by obj_type().
|
static |
Definition at line 38 of file objspace_dump.c.
References rb_str_vcatf(), dump_config::stream, and dump_config::string.
Referenced by dump_append_special_const(), dump_append_string_content(), dump_append_string_value(), dump_append_symbol_value(), dump_object(), objspace_dump_all(), reachable_object_i(), and root_obj_i().
|
static |
Definition at line 139 of file objspace_dump.c.
References dump_append(), dump_append_symbol_value(), FIX2LONG, FIXNUM_P, FLONUM_P, Qfalse, Qnil, Qtrue, RFLOAT_VALUE, and SYMBOL_P.
Referenced by dump_object().
|
static |
Definition at line 181 of file objspace_dump.c.
References dump_append(), dump_append_string_value(), is_ascii_string, PRIuSIZE, rb_str_capacity(), RSTRING_LEN, STR_EMBED_P, and STR_SHARED_P.
Referenced by dump_object().
|
static |
Definition at line 53 of file objspace_dump.c.
References dump_append(), RSTRING_LEN, and RSTRING_PTR.
Referenced by dump_append_string_content(), and dump_append_symbol_value().
|
static |
Definition at line 95 of file objspace_dump.c.
References dump_append(), dump_append_string_value(), and rb_sym2str.
Referenced by dump_append_special_const().
|
static |
Definition at line 194 of file objspace_dump.c.
References BUILTIN_TYPE, dump_config::cur_obj, dump_config::cur_obj_klass, dump_config::cur_obj_references, dump_append(), dump_append_special_const(), dump_append_string_content(), ELTS_SHARED, ENCODING_GET, ENCODING_IS_ASCII8BIT, rb_io_t::fd, FL_TEST, allocation_info::flags, allocation_info::generation, HASH_PROC_DEFAULT, is_broken_string, allocation_info::line, allocation_info::mid, nd_type, obj_type(), objspace_lookup_allocation_info(), allocation_info::path, PRIuSIZE, RARRAY_EMBED_FLAG, RARRAY_LEN, rb_class2name(), rb_enc_from_index(), rb_enc_name, rb_id2name(), rb_obj_frozen_p(), rb_obj_gc_flags(), RB_OBJ_GC_FLAGS_MAX, rb_obj_memsize_of(), rb_objspace_reachable_objects_from(), rb_sym2str, RBASIC_CLASS, reachable_object_i(), RFILE, RFLOAT_VALUE, RHASH_IFNONE, RHASH_SIZE, ROBJECT_NUMIV, RSTRING_FSTR, RSTRING_PTR, RTEST, RTYPEDDATA_P, RTYPEDDATA_TYPE, ruby_node_name(), SPECIAL_CONST_P, STR_EMBED_P, STR_SHARED_P, dump_config::string, T_ARRAY, T_CLASS, T_DATA, T_FILE, T_FLOAT, T_HASH, T_MODULE, T_NODE, T_OBJECT, T_STRING, T_SYMBOL, and T_ZOMBIE.
Referenced by heap_i(), lbf_dump_object_object(), and objspace_dump().
|
static |
Definition at line 346 of file objspace_dump.c.
References GetOpenFile, NIL_P, output, PRIsVALUE, Qnil, rb_assoc_new(), rb_eArgError, rb_funcallv, rb_hash_aref(), rb_intern, rb_io_check_io(), rb_io_flush(), rb_io_get_write_io(), rb_io_stdio_file(), rb_path2class(), rb_raise(), rb_require(), rb_str_new_cstr(), RTEST, dump_config::stream, dump_config::string, sym_file, sym_output, sym_stdout, and sym_string.
Referenced by objspace_dump(), and objspace_dump_all().
|
static |
Definition at line 382 of file objspace_dump.c.
References Qnil, rb_io_flush(), rb_str_resurrect(), dump_config::string, sym_file, and sym_string.
Referenced by objspace_dump(), and objspace_dump_all().
|
static |
Definition at line 319 of file objspace_dump.c.
References dump_object(), and RBASIC.
Referenced by objspace_dump_all().
void Init_objspace_dump | ( | VALUE | rb_mObjSpace | ) |
Definition at line 464 of file objspace_dump.c.
References ID2SYM, objspace_dump(), objspace_dump_all(), rb_define_module(), rb_define_module_function(), rb_intern, rb_obj_gc_flags(), sym_file, sym_output, sym_stdout, and sym_string.
Referenced by Init_objspace(), and objspace_internal_super_of().
Definition at line 103 of file objspace_dump.c.
References BUILTIN_TYPE, CASE_TYPE, FALSE, MATCH, STRING, TRUE, and UNDEF.
Referenced by dump_object().
Definition at line 411 of file objspace_dump.c.
References dump_object(), dump_output(), dump_result(), output, Qnil, rb_scan_args(), and sym_string.
Referenced by Init_objspace_dump().
Definition at line 443 of file objspace_dump.c.
References dump_append(), dump_output(), dump_result(), heap_i(), output, Qnil, rb_objspace_each_objects(), rb_objspace_reachable_objects_from_root(), rb_scan_args(), root_obj_i(), dump_config::roots, and sym_file.
Referenced by Init_objspace_dump().
PRINTF_ARGS | ( | static void | dump_appendstruct dump_config *, const char *,..., |
2 | , | ||
3 | |||
) |
|
static |
Definition at line 165 of file objspace_dump.c.
References dump_config::cur_obj_klass, dump_config::cur_obj_references, and dump_append().
Referenced by dump_object().
Definition at line 330 of file objspace_dump.c.
References dump_append(), NULL, dump_config::root_category, and dump_config::roots.
Referenced by objspace_dump_all().
|
static |
Definition at line 23 of file objspace_dump.c.
Referenced by dump_output(), dump_result(), Init_objspace_dump(), and objspace_dump_all().
|
static |
Definition at line 23 of file objspace_dump.c.
Referenced by dump_output(), and Init_objspace_dump().
|
static |
Definition at line 23 of file objspace_dump.c.
Referenced by dump_output(), and Init_objspace_dump().
|
static |
Definition at line 23 of file objspace_dump.c.
Referenced by dump_output(), dump_result(), Init_objspace_dump(), and objspace_dump().