perf/urgent fix:

User visible:
 
 - The values of _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLN (sysconf(3)) were
   being read from perf.data files in the inverse order they are written, fix it.
   (Arnaldo Carvalho de Melo)
 
 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJV9YyvAAoJENZQFvNTUqpAhuMQAIvgDMC8afyIpaSxA+yGMw8L
 KR8NM5Iua8t7js+ZcGuYJSBGrgWyMZksQpB+PFbUUQCOPirvCcTLUB/m4hXqezTt
 ueEXwGLqB1T5TSK5hHTlxMCnBJ6tE/vdSKBHCKYb/0bwAG5XJAwXgZ3rhwm79XR0
 NTZCTNeJno3AmsSAwt0dVCHE2j1twJ3YKvM5XNwEcSn9IOWSNxpVNjy+8Rt2ypPv
 mNPxVaeec8Co6W8sl9HyDlIrZCf3BPK1zDa9zU3mNahWowSfeofdvJMvJPj5veW/
 3kMwZWiNYJdN+NadwztrehD/YlgBPMNi1Bo+80EHKaXoCPSKxDrBM4lrTzNPmini
 bKIY7o6LetkvjH/etJ5DyHWPZTWDBg0RAhyf/lztMXijlE6/GtGQgVYu1MG3SCka
 3rthavyJiI1bPpJf/oGvBIbusQwHmqgpMYW2mQOS5VEfLY3fN/fEffnHCIxVzkrG
 Tp2se8FEHxXIub66kBSNe4NfgYTVvcSEP42Cb1dtVur4llHemUQW23wLB88hVow2
 I8/JgrfOArIqtjnJXBMXm6+n+siRgAFC/XsVL/9KaMrtKc/sy9Gz7YQl6TyOwaNH
 als8b9brL9HvvbWRLH5uVqa6ZlHMxKjYd5SepQ5LBIA76eTosU+xHT11t2xq36sl
 qW9/zTx5m5ytEUnqfMzm
 =8u6b
 -----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 fix from Arnaldo Carvalho de Melo:

  - The values of _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLN (sysconf(3)) were
    being read from perf.data files in the inverse order they are written, fix it.
    (Arnaldo Carvalho de Melo)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Ingo Molnar 2015-09-14 09:29:22 +02:00
commit 91a4dc9f71
1 changed files with 2 additions and 2 deletions

View File

@ -1438,7 +1438,7 @@ static int process_nrcpus(struct perf_file_section *section __maybe_unused,
if (ph->needs_swap)
nr = bswap_32(nr);
ph->env.nr_cpus_online = nr;
ph->env.nr_cpus_avail = nr;
ret = readn(fd, &nr, sizeof(nr));
if (ret != sizeof(nr))
@ -1447,7 +1447,7 @@ static int process_nrcpus(struct perf_file_section *section __maybe_unused,
if (ph->needs_swap)
nr = bswap_32(nr);
ph->env.nr_cpus_avail = nr;
ph->env.nr_cpus_online = nr;
return 0;
}