static int
do_zoom_dso(struct hist_browser *browser, struct popup_action *act)
{
- struct dso *dso = act->dso;
+ struct map *map = act->ms.map;
if (browser->hists->dso_filter) {
pstack__remove(browser->pstack, &browser->hists->dso_filter);
browser->hists->dso_filter = NULL;
ui_helpline__pop();
} else {
- if (dso == NULL)
+ if (map == NULL)
return 0;
ui_helpline__fpush("To zoom out press <- or -> + \"Zoom out of %s DSO\"",
- dso->kernel ? "the Kernel" : dso->short_name);
- browser->hists->dso_filter = dso;
+ __map__is_kernel(map) ? "the Kernel" : map->dso->short_name);
+ browser->hists->dso_filter = map->dso;
perf_hpp__set_elide(HISTC_DSO, true);
pstack__push(browser->pstack, &browser->hists->dso_filter);
}
static int
add_dso_opt(struct hist_browser *browser, struct popup_action *act,
- char **optstr, struct dso *dso)
+ char **optstr, struct map *map)
{
- if (dso == NULL)
+ if (map == NULL)
return 0;
if (asprintf(optstr, "Zoom %s %s DSO",
browser->hists->dso_filter ? "out of" : "into",
- dso->kernel ? "the Kernel" : dso->short_name) < 0)
+ __map__is_kernel(map) ? "the Kernel" : map->dso->short_name) < 0)
return 0;
- act->dso = dso;
+ act->ms.map = map;
+ act->dso = map->dso;
act->fn = do_zoom_dso;
return 1;
}
while (1) {
struct thread *thread = NULL;
struct dso *dso = NULL;
+ struct map *map = NULL;
int choice = 0;
int socked_id = -1;
if (browser->he_selection != NULL) {
thread = hist_browser__selected_thread(browser);
- dso = browser->selection->map ? browser->selection->map->dso : NULL;
+ map = browser->selection->map;
+ if (map)
+ dso = map->dso;
socked_id = browser->he_selection->socket;
}
switch (key) {
nr_options += add_thread_opt(browser, &actions[nr_options],
&options[nr_options], thread);
nr_options += add_dso_opt(browser, &actions[nr_options],
- &options[nr_options], dso);
+ &options[nr_options], map);
nr_options += add_map_opt(browser, &actions[nr_options],
&options[nr_options],
browser->selection ?