Fix auto session path duplication
[lttng-tools.git] / lttng / commands / add_context.c
index cb0c08741c7113fd21734b7d065fca518e147b7f..b7a482bf7963e6b13024eff7b4a13dc389499750 100644 (file)
@@ -164,8 +164,8 @@ static struct poptOption long_options[] = {
                .u.perf = {                                             \
                        PERF_TYPE_HW_CACHE,                             \
                        (uint64_t) PERF_COUNT_HW_CACHE_##name           \
-                       * (uint64_t) PERF_COUNT_HW_CACHE_OP_##op        \
-                       * (uint64_t) PERF_COUNT_HW_CACHE_RESULT_##result, \
+                       | ((uint64_t) PERF_COUNT_HW_CACHE_OP_##op << 8) \
+                       | ((uint64_t) PERF_COUNT_HW_CACHE_RESULT_##result << 16), \
                },                                                      \
        }
 
@@ -267,14 +267,14 @@ static void print_ctx_type(FILE *ofp)
        int indent_len = strlen(indent);
        int len, i = 0;
 
-       fprintf(ofp, indent);
+       fprintf(ofp, "%s", indent);
        len = indent_len;
        while (ctx_opts[i].symbol != NULL) {
                if (len > indent_len) {
                        if (len + strlen(ctx_opts[i].symbol) + 2
                                        >= PRINT_LINE_LEN) {
                                fprintf(ofp, ",\n");
-                               fprintf(ofp, indent);
+                               fprintf(ofp, "%s", indent);
                                len = indent_len;
                        } else {
                                len += fprintf(ofp, ", ");
@@ -313,7 +313,7 @@ static void usage(FILE *ofp)
        fprintf(ofp, "\n");
        fprintf(ofp, "Example:\n");
        fprintf(ofp, "This command will add the context information 'prio' and two perf\n"
-                       "counters: hardware branch misses and cache-misses, to all events\n"
+                       "counters: hardware branch misses and cache misses, to all events\n"
                        "in the trace data output:\n");
        fprintf(ofp, "# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses\n");
        fprintf(ofp, "\n");
This page took 0.034059 seconds and 5 git commands to generate.