diff options
| -rw-r--r-- | tools/perf/builtin-trace.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index aa1e2888c81d..12d6fc0227b1 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
| @@ -1262,6 +1262,8 @@ fail: | |||
| 1262 | #define TRACE_PFMAJ (1 << 0) | 1262 | #define TRACE_PFMAJ (1 << 0) |
| 1263 | #define TRACE_PFMIN (1 << 1) | 1263 | #define TRACE_PFMIN (1 << 1) |
| 1264 | 1264 | ||
| 1265 | static const size_t trace__entry_str_size = 2048; | ||
| 1266 | |||
| 1265 | struct trace { | 1267 | struct trace { |
| 1266 | struct perf_tool tool; | 1268 | struct perf_tool tool; |
| 1267 | struct { | 1269 | struct { |
| @@ -1822,7 +1824,7 @@ static int trace__sys_enter(struct trace *trace, struct perf_evsel *evsel, | |||
| 1822 | args = perf_evsel__sc_tp_ptr(evsel, args, sample); | 1824 | args = perf_evsel__sc_tp_ptr(evsel, args, sample); |
| 1823 | 1825 | ||
| 1824 | if (ttrace->entry_str == NULL) { | 1826 | if (ttrace->entry_str == NULL) { |
| 1825 | ttrace->entry_str = malloc(1024); | 1827 | ttrace->entry_str = malloc(trace__entry_str_size); |
| 1826 | if (!ttrace->entry_str) | 1828 | if (!ttrace->entry_str) |
| 1827 | goto out_put; | 1829 | goto out_put; |
| 1828 | } | 1830 | } |
| @@ -1832,9 +1834,9 @@ static int trace__sys_enter(struct trace *trace, struct perf_evsel *evsel, | |||
| 1832 | 1834 | ||
| 1833 | ttrace->entry_time = sample->time; | 1835 | ttrace->entry_time = sample->time; |
| 1834 | msg = ttrace->entry_str; | 1836 | msg = ttrace->entry_str; |
| 1835 | printed += scnprintf(msg + printed, 1024 - printed, "%s(", sc->name); | 1837 | printed += scnprintf(msg + printed, trace__entry_str_size - printed, "%s(", sc->name); |
| 1836 | 1838 | ||
| 1837 | printed += syscall__scnprintf_args(sc, msg + printed, 1024 - printed, | 1839 | printed += syscall__scnprintf_args(sc, msg + printed, trace__entry_str_size - printed, |
| 1838 | args, trace, thread); | 1840 | args, trace, thread); |
| 1839 | 1841 | ||
| 1840 | if (sc->is_exit) { | 1842 | if (sc->is_exit) { |
