{"push_id":1227841325,"size":7,"distinct_size":7,"ref":"refs/heads/perf/config/default-value-v6","head":"4f276756f756d3142af731a1b3a4108af0da7de5","before":"5752d431fd6195334178ff3915969b4820111f72","commits":[{"sha":"0c92395921ec7d595cd18f7b238e30393b593b53","author":{"name":"Taeung Song","email":"dd1ffb307701fbfad51aa975e7fde70d493a4bfc@gmail.com"},"message":"perf config: Introduce default_config_section and default_config_item for default config key-value pairs\n\nWhen initializing default perf config values,\nwe currently use values of actual type(int, bool, char *, etc.).\n\nFor example,\nIf there isn't user config value at ~/.perfconfig\nfor 'annotate.use_offset' config variable,\ndefault value for it is 'true' bool type value in perf like below.\n\nAt ui/browsers/annoate.c\n\nstatic struct annotate_browser_opt {\n        bool hide_src_code,\n             use_offset,\n             jump_arrows,\n             show_linenr,\n             show_nr_jumps,\n             show_total_period;\n} annotate_browser__opts = {\n        .use_offset      = true,\n        .jump_arrows     = true,\n};\n\nBut I suggest using 'struct default_config_section' and\n'struct default_config_item' that can contain default config key-value pairs\nin order to initialize default config values with them, in near future.\n\nIf we do, we could manage default perf config values at one spot (i.e. util/config.c)\nwith default config arrays and it could be easy and simple to modify\nexisting default config values or add default values for new config item.\n\nCc: Namhyung Kim <namhyung@kernel.org>\nCc: Jiri Olsa <jolsa@redhat.com>\nCc: Wang Nan <wangnan0@huawei.com>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Ingo Molnar <mingo@redhat.com>\nCc: Masami Hiramatsu <mhiramat@kernel.org>\nCc: Alexander Shishkin <alexander.shishkin@linux.intel.com>\nSigned-off-by: Taeung Song <treeze.taeung@gmail.com>","distinct":true,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/0c92395921ec7d595cd18f7b238e30393b593b53"},{"sha":"654fd09ca0cb69103db9a6a68f797bac8be29ff8","author":{"name":"Taeung Song","email":"dd1ffb307701fbfad51aa975e7fde70d493a4bfc@gmail.com"},"message":"perf config: Add macros assigning key-value pairs to default_config_item\n\nIn near future, default_config_item arrays will be added\n(e.g. const struct default_config_item colors_config_items[])\nTo simply assign config key-value pairs to default_config_item,\nadd macros that are CONF_VAR() and CONF_*_VAR() for each type.\n\nCc: Namhyung Kim <namhyung@kernel.org>\nCc: Jiri Olsa <jolsa@redhat.com>\nCc: Wang Nan <wangnan0@huawei.com>\nCc: Masami Hiramatsu <mhiramat@kernel.org>\nCc: Alexander Shishkin <alexander.shishkin@linux.intel.com>\nSigned-off-by: Taeung Song <treeze.taeung@gmail.com>","distinct":true,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/654fd09ca0cb69103db9a6a68f797bac8be29ff8"},{"sha":"4f16fd96f5c5587ad16c15546717fc48ba884c79","author":{"name":"Taeung Song","email":"dd1ffb307701fbfad51aa975e7fde70d493a4bfc@gmail.com"},"message":"perf config: Add default section and item arrays for 'colors' config\n\nActual variable for configs of 'colors' section is like below.\n\n(at ui/browser.c)\nstatic struct ui_browser_colorset {\n\tconst char *name, *fg, *bg;\n\tint colorset;\n} ui_browser__colorsets[] = {\n\t{\n\t\t.colorset = HE_COLORSET_TOP,\n\t\t.name\t  = \"top\",\n\t\t.fg\t  = \"red\",\n\t\t.bg\t  = \"default\",\n\t},\n...\n\nBut I suggest using default config arrays for 'colors' section that\ncontain all default config key-value pairs for it.\n\nIn near future, this array will be used on ui/browser.c\nbecause of setting default values of actual variables for 'colors' config.\n\nCc: Namhyung Kim <namhyung@kernel.org>\nCc: Jiri Olsa <jolsa@redhat.com>\nCc: Masami Hiramatsu <mhiramat@kernel.org>\nCc: Wang Nan <wangnan0@huawei.com>\nCc: Alexander Shishkin <alexander.shishkin@linux.intel.com>\nSigned-off-by: Taeung Song <treeze.taeung@gmail.com>","distinct":true,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/4f16fd96f5c5587ad16c15546717fc48ba884c79"},{"sha":"ebe8279ce013bcbd95aa1a0088e940f60b5776cd","author":{"name":"Taeung Song","email":"dd1ffb307701fbfad51aa975e7fde70d493a4bfc@gmail.com"},"message":"perf config: Use combined {fore,back}ground colors value instead of each two color\n\nTo easily set default config values into actual variables for 'colors' config,\nit would be better that actual variables for each 'colors' config\nalso have only one value like 'default_config_item' type.\n\nIf we use combined {fore,back}ground colors values in ui_browser_colorset,\nit smoothly work to initialize default config values for 'colors' config\nby 'colors_config_items' array that contains default values for it at util/config.c.\nbecause both actual variable and config item of 'colors_config_items'\nare equal in the number of values (as just one).\n\nCc: Namhyung Kim <namhyung@kernel.org>\nCc: Jiri Olsa <jolsa@kernel.org>\nCc: Masami Hiramatsu <mhiramat@kernel.org>\nCc: Wang Nan <wangnan0@huawei.com>\nCc: Alexander Shishkin <alexander.shishkin@linux.intel.com>\nSigned-off-by: Taeung Song <treeze.taeung@gmail.com>","distinct":true,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/ebe8279ce013bcbd95aa1a0088e940f60b5776cd"},{"sha":"c60e5ddedb279f6b80519e7d8641392f374f852e","author":{"name":"Taeung Song","email":"dd1ffb307701fbfad51aa975e7fde70d493a4bfc@gmail.com"},"message":"perf config: Initialize ui_browser__colorsets with default config items\n\nSet default config values for 'colors' section with 'colors_config_items[]'\ninstead of actual const char * type values.\n(e.g. using colors_config_item[CONFIG_COLORS_TOP].value.s\ninstead of \"red, default\" string value for 'colors.top')\n\nCc: Namhyung Kim <namhyung@kernel.org>\nCc: Jiri Olsa <jolsa@kernel.org>\nCc: Masami Hiramatsu <mhiramat@kernel.org>\nCc: Wang Nan <wangnan0@huawei.com>\nCc: Alexander Shishkin <alexander.shishkin@linux.intel.com>\nSigned-off-by: Taeung Song <treeze.taeung@gmail.com>","distinct":true,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/c60e5ddedb279f6b80519e7d8641392f374f852e"},{"sha":"5a9e6fa7784287383bc9bb5c91b7fce516d15865","author":{"name":"Taeung Song","email":"dd1ffb307701fbfad51aa975e7fde70d493a4bfc@gmail.com"},"message":"perf config: Add default section and item arrays for 'annotate' config\n\nActual variable for configs of 'annotate' section is like below.\n\n(at ui/browsers/annoate.c)\nstatic struct annotate_browser_opt {\n        bool hide_src_code,\n             use_offset,\n             jump_arrows,\n             show_linenr,\n             show_nr_jumps,\n             show_total_period;\n} annotate_browser__opts = {\n        .use_offset      = true,\n        .jump_arrows     = true,\n};\n\nBut I suggest using default config arrays for 'annotate' section that\ncontain all default config key-value pairs for it.\n\nIn near future, this arrays will be used on ui/browsers/annoate.c\nbecause of setting default values of actual variables for 'annotate' config.\n\nCc: Namhyung Kim <namhyung@kernel.org>\nCc: Jiri Olsa <jolsa@redhat.com>\nCc: Masami Hiramatsu <mhiramat@kernel.org>\nCc: Wang Nan <wangnan0@huawei.com>\nCc: Alexander Shishkin <alexander.shishkin@linux.intel.com>\nSigned-off-by: Taeung Song <treeze.taeung@gmail.com>","distinct":true,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/5a9e6fa7784287383bc9bb5c91b7fce516d15865"},{"sha":"4f276756f756d3142af731a1b3a4108af0da7de5","author":{"name":"Taeung Song","email":"dd1ffb307701fbfad51aa975e7fde70d493a4bfc@gmail.com"},"message":"perf config: Initialize annotate_browser__opts with default config items\n\nSet default config values for 'annotate' section with 'annotate_config_items[]'\ninstead of actual bool type values.\n(e.g. using annotate_config_items[CONFIG_ANNOTATE_USE_OFFSET].value.b\ninstead of 'true' bool type value for 'annotate.use_offset'.)\n\nCc: Namhyung Kim <namhyung@kernel.org>\nCc: Jiri Olsa <jolsa@kernel.org>\nCc: Masami Hiramatsu <mhiramat@kernel.org>\nCc: Wang Nan <wangnan0@huawei.com>\nCc: Alexander Shishkin <alexander.shishkin@linux.intel.com>\nSigned-off-by: Taeung Song <treeze.taeung@gmail.com>","distinct":true,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/4f276756f756d3142af731a1b3a4108af0da7de5"}]}
{"actor":{"display_login":"Taeung"}}