projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
perf hists: Enlarge pid sort entry size
[deliverable/linux.git]
/
tools
/
perf
/
util
/
hist.c
diff --git
a/tools/perf/util/hist.c
b/tools/perf/util/hist.c
index cfab531437c743c4c849d40fd45545fcb2fbcddc..d9826cce68013e1c7302239885cfd9e83bd82320 100644
(file)
--- a/
tools/perf/util/hist.c
+++ b/
tools/perf/util/hist.c
@@
-79,7
+79,7
@@
void hists__calc_col_len(struct hists *hists, struct hist_entry *h)
len = thread__comm_len(h->thread);
if (hists__new_col_len(hists, HISTC_COMM, len))
len = thread__comm_len(h->thread);
if (hists__new_col_len(hists, HISTC_COMM, len))
- hists__set_col_len(hists, HISTC_THREAD, len +
6
);
+ hists__set_col_len(hists, HISTC_THREAD, len +
8
);
if (h->ms.map) {
len = dso__name_len(h->ms.map->dso);
if (h->ms.map) {
len = dso__name_len(h->ms.map->dso);
@@
-117,6
+117,13
@@
void hists__calc_col_len(struct hists *hists, struct hist_entry *h)
hists__new_col_len(hists, HISTC_SYMBOL_TO, symlen);
hists__set_unres_dso_col_len(hists, HISTC_DSO_TO);
}
hists__new_col_len(hists, HISTC_SYMBOL_TO, symlen);
hists__set_unres_dso_col_len(hists, HISTC_DSO_TO);
}
+
+ if (h->branch_info->srcline_from)
+ hists__new_col_len(hists, HISTC_SRCLINE_FROM,
+ strlen(h->branch_info->srcline_from));
+ if (h->branch_info->srcline_to)
+ hists__new_col_len(hists, HISTC_SRCLINE_TO,
+ strlen(h->branch_info->srcline_to));
}
if (h->mem_info) {
}
if (h->mem_info) {
@@
-524,13
+531,13
@@
out:
return he;
}
return he;
}
-struct hist_entry *
__
hists__add_entry(struct hists *hists,
-
struct addr_location *al,
-
struct symbol *sym_parent,
-
struct branch_info *bi,
-
struct mem_info *mi,
-
struct perf_sample *sample,
-
bool sample_self)
+struct hist_entry *hists__add_entry(struct hists *hists,
+ struct addr_location *al,
+ struct symbol *sym_parent,
+ struct branch_info *bi,
+ struct mem_info *mi,
+ struct perf_sample *sample,
+ bool sample_self)
{
struct hist_entry entry = {
.thread = al->thread,
{
struct hist_entry entry = {
.thread = al->thread,
@@
-615,8
+622,8
@@
iter_add_single_mem_entry(struct hist_entry_iter *iter, struct addr_location *al
*/
sample->period = cost;
*/
sample->period = cost;
- he =
__
hists__add_entry(hists, al, iter->parent, NULL, mi,
-
sample, true);
+ he = hists__add_entry(hists, al, iter->parent, NULL, mi,
+ sample, true);
if (!he)
return -ENOMEM;
if (!he)
return -ENOMEM;
@@
-720,8
+727,8
@@
iter_add_next_branch_entry(struct hist_entry_iter *iter, struct addr_location *a
sample->period = 1;
sample->weight = bi->flags.cycles ? bi->flags.cycles : 1;
sample->period = 1;
sample->weight = bi->flags.cycles ? bi->flags.cycles : 1;
- he =
__
hists__add_entry(hists, al, iter->parent, &bi[i], NULL,
-
sample, true);
+ he = hists__add_entry(hists, al, iter->parent, &bi[i], NULL,
+ sample, true);
if (he == NULL)
return -ENOMEM;
if (he == NULL)
return -ENOMEM;
@@
-757,8
+764,8
@@
iter_add_single_normal_entry(struct hist_entry_iter *iter, struct addr_location
struct perf_sample *sample = iter->sample;
struct hist_entry *he;
struct perf_sample *sample = iter->sample;
struct hist_entry *he;
- he =
__
hists__add_entry(evsel__hists(evsel), al, iter->parent, NULL, NULL,
-
sample, true);
+ he = hists__add_entry(evsel__hists(evsel), al, iter->parent, NULL, NULL,
+ sample, true);
if (he == NULL)
return -ENOMEM;
if (he == NULL)
return -ENOMEM;
@@
-818,8
+825,8
@@
iter_add_single_cumulative_entry(struct hist_entry_iter *iter,
struct hist_entry *he;
int err = 0;
struct hist_entry *he;
int err = 0;
- he =
__
hists__add_entry(hists, al, iter->parent, NULL, NULL,
-
sample, true);
+ he = hists__add_entry(hists, al, iter->parent, NULL, NULL,
+ sample, true);
if (he == NULL)
return -ENOMEM;
if (he == NULL)
return -ENOMEM;
@@
-893,8
+900,8
@@
iter_add_next_cumulative_entry(struct hist_entry_iter *iter,
}
}
}
}
- he =
__
hists__add_entry(evsel__hists(evsel), al, iter->parent, NULL, NULL,
-
sample, false);
+ he = hists__add_entry(evsel__hists(evsel), al, iter->parent, NULL, NULL,
+ sample, false);
if (he == NULL)
return -ENOMEM;
if (he == NULL)
return -ENOMEM;
@@
-1042,6
+1049,8
@@
void hist_entry__delete(struct hist_entry *he)
if (he->branch_info) {
map__zput(he->branch_info->from.map);
map__zput(he->branch_info->to.map);
if (he->branch_info) {
map__zput(he->branch_info->from.map);
map__zput(he->branch_info->to.map);
+ free_srcline(he->branch_info->srcline_from);
+ free_srcline(he->branch_info->srcline_to);
zfree(&he->branch_info);
}
zfree(&he->branch_info);
}
@@
-1072,7
+1081,7
@@
int hist_entry__snprintf_alignment(struct hist_entry *he, struct perf_hpp *hpp,
struct perf_hpp_fmt *fmt, int printed)
{
if (!list_is_last(&fmt->list, &he->hists->hpp_list->fields)) {
struct perf_hpp_fmt *fmt, int printed)
{
if (!list_is_last(&fmt->list, &he->hists->hpp_list->fields)) {
- const int width = fmt->width(fmt, hpp, h
ists_to_evsel(he->hists)
);
+ const int width = fmt->width(fmt, hpp, h
e->hists
);
if (printed < width) {
advance_hpp(hpp, printed);
printed = scnprintf(hpp->buf, hpp->size, "%-*s", width - printed, " ");
if (printed < width) {
advance_hpp(hpp, printed);
printed = scnprintf(hpp->buf, hpp->size, "%-*s", width - printed, " ");
This page took
0.028805 seconds
and
5
git commands to generate.