forked from Minki/linux
perf/urgent fixes
. Fix numa topology printing, from Namhyung Kim. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iQIcBAABAgAGBQJQj8zQAAoJENZQFvNTUqpA+H8QAKfYFzkv6QOMK0XyM36TM0ga zAVho7OwyM/syZS3P4dD6Acz8LotzylhxA5qQZilbzArrOh6nAkbkPUW0UDrDX65 VH67IGtlfFqvSsdCgtp+NJx6bA11C8HuSCjlj0JRd84cneO9Meb/rXkPwVTW5HKM YcSOJ3PAN8vQtaqidUhT+Hswlb8zJQ+TXNBSAvGHxbKF3haz83ncdELcHcayF2ea PzzEzlE/MYb+mm9ad3xlV78PvEs1S7TsU4G8NaAzEw1Eom0sStpm/N/bagOH5g3n B+C8hhAAWs3/Ro53CwgIewXp5EpeiXQodmT0gh0HM9acXu09IUUAOhboS+fFltId H6fW7QHuGolg02qK1M0Qg5bq6aEFRAeSENUZ4iunE66HgWWqrJuLRvwEJYsT1sWF T1H6DzTWwOKL4elvoKgnS5uoV8SK/YSImcsjJv+dP8lfSaOzrNQnWMTSxOEGJB9x Ht5CT8NczbwF7y2gnQqouritVCXhIW0X1f6KzpqSlIuJm5iX7ucZIyyvpY7EPTnZ aZ+UazEcBrexZPWhy7Z03xdn0vIIV7YQsnaW3B7pKvWJP0DXVkf13z1nJw8DmbOP ERWflYAp+2VSV8QEKaedQUz3Eyht603v4gZMelqKV0c23YUjrtraym7Cp8fq5ps5 HKTKXxCEexBpKK6b4Yhx =v90z -----END PGP SIGNATURE----- Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: * Fix numa topology printing, from Namhyung Kim. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
18423d3562
@ -1378,6 +1378,8 @@ static void print_numa_topology(struct perf_header *ph, int fd __maybe_unused,
|
||||
|
||||
str = tmp + 1;
|
||||
fprintf(fp, "# node%u cpu list : %s\n", c, str);
|
||||
|
||||
str += strlen(str) + 1;
|
||||
}
|
||||
return;
|
||||
error:
|
||||
|
@ -90,17 +90,17 @@ void strbuf_addf(struct strbuf *sb, const char *fmt, ...)
|
||||
if (!strbuf_avail(sb))
|
||||
strbuf_grow(sb, 64);
|
||||
va_start(ap, fmt);
|
||||
len = vscnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap);
|
||||
len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap);
|
||||
va_end(ap);
|
||||
if (len < 0)
|
||||
die("your vscnprintf is broken");
|
||||
die("your vsnprintf is broken");
|
||||
if (len > strbuf_avail(sb)) {
|
||||
strbuf_grow(sb, len);
|
||||
va_start(ap, fmt);
|
||||
len = vscnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap);
|
||||
len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap);
|
||||
va_end(ap);
|
||||
if (len > strbuf_avail(sb)) {
|
||||
die("this should not happen, your snprintf is broken");
|
||||
die("this should not happen, your vsnprintf is broken");
|
||||
}
|
||||
}
|
||||
strbuf_setlen(sb, sb->len + len);
|
||||
|
Loading…
Reference in New Issue
Block a user