perf test: Consider PERF_SAMPLE_TRANSACTION in the "sample parsing" test
[deliverable/linux.git] / tools / perf / util / hist.c
index 9ff6cf3e9a99f69596b37372f60203c11bec88a3..cca03831f41abcc88557572220fa0d2e9b6a14c8 100644 (file)
@@ -160,6 +160,10 @@ void hists__calc_col_len(struct hists *hists, struct hist_entry *h)
        hists__new_col_len(hists, HISTC_MEM_LVL, 21 + 3);
        hists__new_col_len(hists, HISTC_LOCAL_WEIGHT, 12);
        hists__new_col_len(hists, HISTC_GLOBAL_WEIGHT, 12);
+
+       if (h->transaction)
+               hists__new_col_len(hists, HISTC_TRANSACTION,
+                                  hist_entry__transaction_len());
 }
 
 void hists__output_recalc_col_len(struct hists *hists, int max_rows)
@@ -346,7 +350,7 @@ static struct hist_entry *add_hist_entry(struct hists *hists,
        struct rb_node **p;
        struct rb_node *parent = NULL;
        struct hist_entry *he;
-       int cmp;
+       int64_t cmp;
 
        p = &hists->entries_in->rb_node;
 
@@ -466,7 +470,7 @@ struct hist_entry *__hists__add_branch_entry(struct hists *self,
 struct hist_entry *__hists__add_entry(struct hists *self,
                                      struct addr_location *al,
                                      struct symbol *sym_parent, u64 period,
-                                     u64 weight)
+                                     u64 weight, u64 transaction)
 {
        struct hist_entry entry = {
                .thread = al->thread,
@@ -487,6 +491,7 @@ struct hist_entry *__hists__add_entry(struct hists *self,
                .hists  = self,
                .branch_info = NULL,
                .mem_info = NULL,
+               .transaction = transaction,
        };
 
        return add_hist_entry(self, &entry, al, period, weight);
@@ -530,6 +535,7 @@ void hist_entry__free(struct hist_entry *he)
 {
        free(he->branch_info);
        free(he->mem_info);
+       free_srcline(he->srcline);
        free(he);
 }
 
@@ -884,7 +890,7 @@ static struct hist_entry *hists__add_dummy_entry(struct hists *hists,
        struct rb_node **p;
        struct rb_node *parent = NULL;
        struct hist_entry *he;
-       int cmp;
+       int64_t cmp;
 
        if (sort__need_collapse)
                root = &hists->entries_collapsed;
This page took 0.024588 seconds and 5 git commands to generate.