Messages in this thread Patch in this message | | | Date | Wed, 31 Oct 2012 02:02:41 -0700 | From | Andi Kleen <> | Subject | [PATCH] perf, tools: Fix WERROR=1 build with transction flags and fix browser |
| |
And one additional patch for this one to fix the WERROR=0 build again
--- - Fix the WERROR=1 build by avoiding some warnings - Add a missing hunk to make the transaction flags display in the browser, not only in --stdio
Signed-off-by: Andi Kleen <ak@linux.intel.com>
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index 5d20e11..41ddcf8 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c @@ -582,7 +582,7 @@ static inline char *add_str(char *p, const char *str) static struct txbit { unsigned flag; - char *name; + const char *name; } txbits[] = { { PERF_SAMPLE_TXN_ELISION, "EL " }, { PERF_SAMPLE_TXN_TRANSACTION, "TX " }, @@ -593,7 +593,7 @@ static struct txbit { { PERF_SAMPLE_TXN_CAPACITY, "CAP " }, { PERF_SAMPLE_TXN_MEMORY, "MEM " }, { PERF_SAMPLE_TXN_MISC, "MISC " }, - {} + { 0, NULL } }; static int hist_entry__transaction_snprintf(struct hist_entry *self, char *bf, @@ -716,6 +716,8 @@ int sort_dimension__add(const char *tok) sort__first_dimension = SORT_GLOBAL_WEIGHT; else if (!strcmp(sd->name, "local_weight")) sort__first_dimension = SORT_LOCAL_WEIGHT; + else if (!strcmp(sd->name, "transaction")) + sort__first_dimension = SORT_TRANSACTION; } list_add_tail(&sd->entry->list, &hist_entry__sort_list); -- ak@linux.intel.com -- Speaking for myself only
| |