|
@@ -75,10 +75,9 @@ static int report__config(const char *var, const char *value, void *cb)
|
|
return perf_default_config(var, value, cb);
|
|
return perf_default_config(var, value, cb);
|
|
}
|
|
}
|
|
|
|
|
|
-static int report__add_mem_hist_entry(struct perf_tool *tool, struct addr_location *al,
|
|
|
|
|
|
+static int report__add_mem_hist_entry(struct report *rep, struct addr_location *al,
|
|
struct perf_sample *sample, struct perf_evsel *evsel)
|
|
struct perf_sample *sample, struct perf_evsel *evsel)
|
|
{
|
|
{
|
|
- struct report *rep = container_of(tool, struct report, tool);
|
|
|
|
struct symbol *parent = NULL;
|
|
struct symbol *parent = NULL;
|
|
struct hist_entry *he;
|
|
struct hist_entry *he;
|
|
struct mem_info *mi, *mx;
|
|
struct mem_info *mi, *mx;
|
|
@@ -127,10 +126,9 @@ out:
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|
|
-static int report__add_branch_hist_entry(struct perf_tool *tool, struct addr_location *al,
|
|
|
|
|
|
+static int report__add_branch_hist_entry(struct report *rep, struct addr_location *al,
|
|
struct perf_sample *sample, struct perf_evsel *evsel)
|
|
struct perf_sample *sample, struct perf_evsel *evsel)
|
|
{
|
|
{
|
|
- struct report *rep = container_of(tool, struct report, tool);
|
|
|
|
struct symbol *parent = NULL;
|
|
struct symbol *parent = NULL;
|
|
unsigned i;
|
|
unsigned i;
|
|
struct hist_entry *he;
|
|
struct hist_entry *he;
|
|
@@ -181,10 +179,9 @@ out:
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|
|
-static int report__add_hist_entry(struct perf_tool *tool, struct perf_evsel *evsel,
|
|
|
|
|
|
+static int report__add_hist_entry(struct report *rep, struct perf_evsel *evsel,
|
|
struct addr_location *al, struct perf_sample *sample)
|
|
struct addr_location *al, struct perf_sample *sample)
|
|
{
|
|
{
|
|
- struct report *rep = container_of(tool, struct report, tool);
|
|
|
|
struct symbol *parent = NULL;
|
|
struct symbol *parent = NULL;
|
|
struct hist_entry *he;
|
|
struct hist_entry *he;
|
|
int err = sample__resolve_callchain(sample, &parent, evsel, al, rep->max_stack);
|
|
int err = sample__resolve_callchain(sample, &parent, evsel, al, rep->max_stack);
|
|
@@ -233,18 +230,18 @@ static int process_sample_event(struct perf_tool *tool,
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
if (sort__mode == SORT_MODE__BRANCH) {
|
|
if (sort__mode == SORT_MODE__BRANCH) {
|
|
- ret = report__add_branch_hist_entry(tool, &al, sample, evsel);
|
|
|
|
|
|
+ ret = report__add_branch_hist_entry(rep, &al, sample, evsel);
|
|
if (ret < 0)
|
|
if (ret < 0)
|
|
pr_debug("problem adding lbr entry, skipping event\n");
|
|
pr_debug("problem adding lbr entry, skipping event\n");
|
|
} else if (rep->mem_mode == 1) {
|
|
} else if (rep->mem_mode == 1) {
|
|
- ret = report__add_mem_hist_entry(tool, &al, sample, evsel);
|
|
|
|
|
|
+ ret = report__add_mem_hist_entry(rep, &al, sample, evsel);
|
|
if (ret < 0)
|
|
if (ret < 0)
|
|
pr_debug("problem adding mem entry, skipping event\n");
|
|
pr_debug("problem adding mem entry, skipping event\n");
|
|
} else {
|
|
} else {
|
|
if (al.map != NULL)
|
|
if (al.map != NULL)
|
|
al.map->dso->hit = 1;
|
|
al.map->dso->hit = 1;
|
|
|
|
|
|
- ret = report__add_hist_entry(tool, evsel, &al, sample);
|
|
|
|
|
|
+ ret = report__add_hist_entry(rep, evsel, &al, sample);
|
|
if (ret < 0)
|
|
if (ret < 0)
|
|
pr_debug("problem incrementing symbol period, skipping event\n");
|
|
pr_debug("problem incrementing symbol period, skipping event\n");
|
|
}
|
|
}
|