aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/probe-event.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 4bde988a0b04..d3af30d62880 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -1068,13 +1068,13 @@ static char *synthesize_perf_probe_point(struct perf_probe_point *pp)
1068 goto error; 1068 goto error;
1069 } 1069 }
1070 if (pp->file) { 1070 if (pp->file) {
1071 len = strlen(pp->file) - 31; 1071 tmp = pp->file;
1072 if (len < 0) 1072 len = strlen(tmp);
1073 len = 0; 1073 if (len > 30) {
1074 tmp = strchr(pp->file + len, '/'); 1074 tmp = strchr(pp->file + len - 30, '/');
1075 if (!tmp) 1075 tmp = tmp ? tmp + 1 : pp->file + len - 30;
1076 tmp = pp->file + len; 1076 }
1077 ret = e_snprintf(file, 32, "@%s", tmp + 1); 1077 ret = e_snprintf(file, 32, "@%s", tmp);
1078 if (ret <= 0) 1078 if (ret <= 0)
1079 goto error; 1079 goto error;
1080 } 1080 }