perf test: Consider PERF_SAMPLE_TRANSACTION in the "sample parsing" test
[deliverable/linux.git] / tools / perf / util / hist.c
index 97dc2808885d2cbfd43f0e74084995eb92034ed5..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)
@@ -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);
 }
 
This page took 0.047982 seconds and 5 git commands to generate.