|
@@ -224,7 +224,7 @@ static bool annotate_browser__toggle_source(struct annotate_browser *browser)
|
|
|
}
|
|
|
|
|
|
static int annotate_browser__run(struct annotate_browser *self, int evidx,
|
|
|
- int nr_events, void(*timer)(void *arg),
|
|
|
+ void(*timer)(void *arg),
|
|
|
void *arg, int delay_secs)
|
|
|
{
|
|
|
struct rb_node *nd = NULL;
|
|
@@ -328,8 +328,7 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx,
|
|
|
notes = symbol__annotation(target);
|
|
|
pthread_mutex_lock(¬es->lock);
|
|
|
|
|
|
- if (notes->src == NULL &&
|
|
|
- symbol__alloc_hist(target, nr_events) < 0) {
|
|
|
+ if (notes->src == NULL && symbol__alloc_hist(target) < 0) {
|
|
|
pthread_mutex_unlock(¬es->lock);
|
|
|
ui__warning("Not enough memory for annotating '%s' symbol!\n",
|
|
|
target->name);
|
|
@@ -337,7 +336,7 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx,
|
|
|
}
|
|
|
|
|
|
pthread_mutex_unlock(¬es->lock);
|
|
|
- symbol__tui_annotate(target, ms->map, evidx, nr_events,
|
|
|
+ symbol__tui_annotate(target, ms->map, evidx,
|
|
|
timer, arg, delay_secs);
|
|
|
}
|
|
|
continue;
|
|
@@ -358,15 +357,15 @@ out:
|
|
|
return key;
|
|
|
}
|
|
|
|
|
|
-int hist_entry__tui_annotate(struct hist_entry *he, int evidx, int nr_events,
|
|
|
+int hist_entry__tui_annotate(struct hist_entry *he, int evidx,
|
|
|
void(*timer)(void *arg), void *arg, int delay_secs)
|
|
|
{
|
|
|
- return symbol__tui_annotate(he->ms.sym, he->ms.map, evidx, nr_events,
|
|
|
+ return symbol__tui_annotate(he->ms.sym, he->ms.map, evidx,
|
|
|
timer, arg, delay_secs);
|
|
|
}
|
|
|
|
|
|
int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx,
|
|
|
- int nr_events, void(*timer)(void *arg), void *arg,
|
|
|
+ void(*timer)(void *arg), void *arg,
|
|
|
int delay_secs)
|
|
|
{
|
|
|
struct objdump_line *pos, *n;
|
|
@@ -419,8 +418,7 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx,
|
|
|
browser.b.nr_entries = browser.nr_entries;
|
|
|
browser.b.entries = ¬es->src->source,
|
|
|
browser.b.width += 18; /* Percentage */
|
|
|
- ret = annotate_browser__run(&browser, evidx, nr_events,
|
|
|
- timer, arg, delay_secs);
|
|
|
+ ret = annotate_browser__run(&browser, evidx, timer, arg, delay_secs);
|
|
|
list_for_each_entry_safe(pos, n, ¬es->src->source, node) {
|
|
|
list_del(&pos->node);
|
|
|
objdump_line__free(pos);
|