aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/perf.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-10-23 02:23:20 -0400
committerIngo Molnar <mingo@elte.hu>2009-10-23 02:23:20 -0400
commit43315956509ca6913764861ac7dec128b91eb1ec (patch)
tree60fd5647f150a46e63093a41417c2eef3e776b3d /tools/perf/perf.c
parent9bf4e7fba8006d19846fec877b6da0616b2772de (diff)
parent6beba7adbe092e63dfe8d09fbd1e3ec140474a13 (diff)
Merge branch 'perf/core' into perf/probes
Conflicts: tools/perf/Makefile Merge reason: - fix the conflict - pick up the pr_*() infrastructure to queue up dependent patch Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/perf.c')
-rw-r--r--tools/perf/perf.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index c570d177d5c6..9cafe5463266 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -89,8 +89,8 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)
89 /* 89 /*
90 * Check remaining flags. 90 * Check remaining flags.
91 */ 91 */
92 if (!prefixcmp(cmd, "--exec-path")) { 92 if (!prefixcmp(cmd, CMD_EXEC_PATH)) {
93 cmd += 11; 93 cmd += strlen(CMD_EXEC_PATH);
94 if (*cmd == '=') 94 if (*cmd == '=')
95 perf_set_argv_exec_path(cmd + 1); 95 perf_set_argv_exec_path(cmd + 1);
96 else { 96 else {
@@ -117,8 +117,8 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)
117 (*argv)++; 117 (*argv)++;
118 (*argc)--; 118 (*argc)--;
119 handled++; 119 handled++;
120 } else if (!prefixcmp(cmd, "--perf-dir=")) { 120 } else if (!prefixcmp(cmd, CMD_PERF_DIR)) {
121 setenv(PERF_DIR_ENVIRONMENT, cmd + 10, 1); 121 setenv(PERF_DIR_ENVIRONMENT, cmd + strlen(CMD_PERF_DIR), 1);
122 if (envchanged) 122 if (envchanged)
123 *envchanged = 1; 123 *envchanged = 1;
124 } else if (!strcmp(cmd, "--work-tree")) { 124 } else if (!strcmp(cmd, "--work-tree")) {
@@ -131,8 +131,8 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)
131 *envchanged = 1; 131 *envchanged = 1;
132 (*argv)++; 132 (*argv)++;
133 (*argc)--; 133 (*argc)--;
134 } else if (!prefixcmp(cmd, "--work-tree=")) { 134 } else if (!prefixcmp(cmd, CMD_WORK_TREE)) {
135 setenv(PERF_WORK_TREE_ENVIRONMENT, cmd + 12, 1); 135 setenv(PERF_WORK_TREE_ENVIRONMENT, cmd + strlen(CMD_WORK_TREE), 1);
136 if (envchanged) 136 if (envchanged)
137 *envchanged = 1; 137 *envchanged = 1;
138 } else if (!strcmp(cmd, "--debugfs-dir")) { 138 } else if (!strcmp(cmd, "--debugfs-dir")) {
@@ -146,8 +146,8 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)
146 *envchanged = 1; 146 *envchanged = 1;
147 (*argv)++; 147 (*argv)++;
148 (*argc)--; 148 (*argc)--;
149 } else if (!prefixcmp(cmd, "--debugfs-dir=")) { 149 } else if (!prefixcmp(cmd, CMD_DEBUGFS_DIR)) {
150 strncpy(debugfs_mntpt, cmd + 14, MAXPATHLEN); 150 strncpy(debugfs_mntpt, cmd + strlen(CMD_DEBUGFS_DIR), MAXPATHLEN);
151 debugfs_mntpt[MAXPATHLEN - 1] = '\0'; 151 debugfs_mntpt[MAXPATHLEN - 1] = '\0';
152 if (envchanged) 152 if (envchanged)
153 *envchanged = 1; 153 *envchanged = 1;