Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09211e25 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge tag 'perf-core-for-mingo-20160715' of...

Merge tag 'perf-core-for-mingo-20160715' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

 into perf/core

Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

User visible changes:

 - Allow reading from a backward ring buffer (one setup via sys_perf_event_open()
   with perf_event_attr.write_backward = 1) (Wang Nan)

Infrastructure changes:

 - Fix the build on Android NDK r12b (initially just for ARM), that is now port
   of my perf-build container collection and will get tested prior to sending
   patches upstream (Arnaldo Carvalho de Melo)

 - Add correct header for IPv6 definitions

 - Fix bitsperlong.h fallout (Arnaldo Carvalho de Melo, Peter Zijlstra)

 - Use base 0 (auto) in filename__read_ull(), so that we can handle hex values too (Jiri Olsa)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents b29c6574 b49364f3
Loading
Loading
Loading
Loading
+2 −21
Original line number Diff line number Diff line
@@ -3,30 +3,11 @@

#include <uapi/asm-generic/bitsperlong.h>

/*
 * In the kernel, where this file comes from, we can rely on CONFIG_64BIT,
 * here we have to make amends with what the various compilers provides us
 * to figure out if we're on a 64-bit machine...
 */
#ifdef __SIZEOF_LONG__
# if __SIZEOF_LONG__ == 8
#  define CONFIG_64BIT
# endif
#else
# ifdef __WORDSIZE
#  if __WORDSIZE == 64
#   define CONFIG_64BIT
#  endif
#define BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__)
#else
#  error Failed to determine BITS_PER_LONG value
#define BITS_PER_LONG __WORDSIZE
#endif
#endif

#ifdef CONFIG_64BIT
#define BITS_PER_LONG 64
#else
#define BITS_PER_LONG 32
#endif /* CONFIG_64BIT */

#if BITS_PER_LONG != __BITS_PER_LONG
#error Inconsistent word size. Check asm/bitsperlong.h
+11 −0
Original line number Diff line number Diff line
@@ -9,6 +9,17 @@
# define __always_inline	inline __attribute__((always_inline))
#endif

#ifdef __ANDROID__
/*
 * FIXME: Big hammer to get rid of tons of:
 *   "warning: always_inline function might not be inlinable"
 *
 * At least on android-ndk-r12/platforms/android-24/arch-arm
 */
#undef __always_inline
#define __always_inline	inline
#endif

#define __user

#ifndef __attribute_const__
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ struct fdarray {
	struct pollfd *entries;
	union {
		int    idx;
		void   *ptr;
	} *priv;
};

+6 −1
Original line number Diff line number Diff line
@@ -283,6 +283,11 @@ int filename__read_int(const char *filename, int *value)
	return err;
}

/*
 * Parses @value out of @filename with strtoull.
 * By using 0 for base, the strtoull detects the
 * base automatically (see man strtoull).
 */
int filename__read_ull(const char *filename, unsigned long long *value)
{
	char line[64];
@@ -292,7 +297,7 @@ int filename__read_ull(const char *filename, unsigned long long *value)
		return -1;

	if (read(fd, line, sizeof(line)) > 0) {
		*value = strtoull(line, NULL, 10);
		*value = strtoull(line, NULL, 0);
		if (*value != ULLONG_MAX)
			err = 0;
	}
+2 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
 *  Frederic Weisbecker gave his permission to relicense the code to
 *  the Lesser General Public License.
 */
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -33,7 +34,7 @@
#include <limits.h>
#include <linux/string.h>

#include <netinet/ip6.h>
#include <netinet/in.h>
#include "event-parse.h"
#include "event-utils.h"

Loading