mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
Linux 4.2
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJV40ypAAoJEHm+PkMAQRiGSAYH/itdmCdWrcciOERAEdwSJD0e HvuohwhrJWmA7BsXMiIjJa5hAybut69VCAEnZAfNRZk2kWJd6jbg0Y0pOWcuh8tx vOQNkzYkDFEuJYYnMj2EtcQqomT1WAZaz45zSKf+j/HAHzvTBLZ3/J7RoxVQ0pj9 1/MgP4+N6TGgRlizvQeTSm0hWkxiMUqah6x+SHX1e/4jrN9SPS/Ik6bHaQpEmpP3 /16WpfoVEBKgN+rd4kmZJxTt3RR8FvR8qGBS5/ipaFPxelOXuo7bTjnpd1EAtZ/T 8LO3G9mHNjslaLkSRJnAX0TI6zZhZprb8mR8+kSMPRNCx2+WjzGynXKINphMVS0= =lk53 -----END PGP SIGNATURE----- Merge tag 'v4.2' into for_next Linux 4.2
This commit is contained in:
commit
650c919798
1394 changed files with 14467 additions and 9560 deletions
|
|
@ -36,7 +36,7 @@ $(LIBFILE): $(API_IN)
|
|||
|
||||
clean:
|
||||
$(call QUIET_CLEAN, libapi) $(RM) $(LIBFILE); \
|
||||
find $(if $(OUTPUT),$(OUTPUT),.) -name \*.o | xargs $(RM)
|
||||
find $(if $(OUTPUT),$(OUTPUT),.) -name \*.o -or -name \*.o.cmd -or -name \*.o.d | xargs $(RM)
|
||||
|
||||
FORCE:
|
||||
|
||||
|
|
|
|||
62
tools/lib/hweight.c
Normal file
62
tools/lib/hweight.c
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
#include <linux/bitops.h>
|
||||
#include <asm/types.h>
|
||||
|
||||
/**
|
||||
* hweightN - returns the hamming weight of a N-bit word
|
||||
* @x: the word to weigh
|
||||
*
|
||||
* The Hamming Weight of a number is the total number of bits set in it.
|
||||
*/
|
||||
|
||||
unsigned int __sw_hweight32(unsigned int w)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_HAS_FAST_MULTIPLIER
|
||||
w -= (w >> 1) & 0x55555555;
|
||||
w = (w & 0x33333333) + ((w >> 2) & 0x33333333);
|
||||
w = (w + (w >> 4)) & 0x0f0f0f0f;
|
||||
return (w * 0x01010101) >> 24;
|
||||
#else
|
||||
unsigned int res = w - ((w >> 1) & 0x55555555);
|
||||
res = (res & 0x33333333) + ((res >> 2) & 0x33333333);
|
||||
res = (res + (res >> 4)) & 0x0F0F0F0F;
|
||||
res = res + (res >> 8);
|
||||
return (res + (res >> 16)) & 0x000000FF;
|
||||
#endif
|
||||
}
|
||||
|
||||
unsigned int __sw_hweight16(unsigned int w)
|
||||
{
|
||||
unsigned int res = w - ((w >> 1) & 0x5555);
|
||||
res = (res & 0x3333) + ((res >> 2) & 0x3333);
|
||||
res = (res + (res >> 4)) & 0x0F0F;
|
||||
return (res + (res >> 8)) & 0x00FF;
|
||||
}
|
||||
|
||||
unsigned int __sw_hweight8(unsigned int w)
|
||||
{
|
||||
unsigned int res = w - ((w >> 1) & 0x55);
|
||||
res = (res & 0x33) + ((res >> 2) & 0x33);
|
||||
return (res + (res >> 4)) & 0x0F;
|
||||
}
|
||||
|
||||
unsigned long __sw_hweight64(__u64 w)
|
||||
{
|
||||
#if BITS_PER_LONG == 32
|
||||
return __sw_hweight32((unsigned int)(w >> 32)) +
|
||||
__sw_hweight32((unsigned int)w);
|
||||
#elif BITS_PER_LONG == 64
|
||||
#ifdef CONFIG_ARCH_HAS_FAST_MULTIPLIER
|
||||
w -= (w >> 1) & 0x5555555555555555ul;
|
||||
w = (w & 0x3333333333333333ul) + ((w >> 2) & 0x3333333333333333ul);
|
||||
w = (w + (w >> 4)) & 0x0f0f0f0f0f0f0f0ful;
|
||||
return (w * 0x0101010101010101ul) >> 56;
|
||||
#else
|
||||
__u64 res = w - ((w >> 1) & 0x5555555555555555ul);
|
||||
res = (res & 0x3333333333333333ul) + ((res >> 2) & 0x3333333333333333ul);
|
||||
res = (res + (res >> 4)) & 0x0F0F0F0F0F0F0F0Ful;
|
||||
res = res + (res >> 8);
|
||||
res = res + (res >> 16);
|
||||
return (res + (res >> 32)) & 0x00000000000000FFul;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
|
@ -268,7 +268,7 @@ install: install_lib
|
|||
|
||||
clean:
|
||||
$(call QUIET_CLEAN, libtraceevent) \
|
||||
$(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d \
|
||||
$(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d .*.cmd \
|
||||
$(RM) TRACEEVENT-CFLAGS tags TAGS
|
||||
|
||||
PHONY += force plugins
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ tools/arch/x86/include/asm/atomic.h
|
|||
tools/arch/x86/include/asm/rmwcc.h
|
||||
tools/lib/traceevent
|
||||
tools/lib/api
|
||||
tools/lib/hweight.c
|
||||
tools/lib/rbtree.c
|
||||
tools/lib/symbol/kallsyms.c
|
||||
tools/lib/symbol/kallsyms.h
|
||||
|
|
@ -57,7 +58,6 @@ include/linux/perf_event.h
|
|||
include/linux/list.h
|
||||
include/linux/hash.h
|
||||
include/linux/stringify.h
|
||||
lib/hweight.c
|
||||
include/linux/swab.h
|
||||
arch/*/include/asm/unistd*.h
|
||||
arch/*/include/uapi/asm/unistd*.h
|
||||
|
|
|
|||
|
|
@ -109,9 +109,22 @@ $(OUTPUT)PERF-VERSION-FILE: ../../.git/HEAD
|
|||
$(Q)$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT)
|
||||
$(Q)touch $(OUTPUT)PERF-VERSION-FILE
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD ?= $(CROSS_COMPILE)ld
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
# Makefiles suck: This macro sets a default value of $(2) for the
|
||||
# variable named by $(1), unless the variable has been set by
|
||||
# environment or command line. This is necessary for CC and AR
|
||||
# because make sets default values, so the simpler ?= approach
|
||||
# won't work as expected.
|
||||
define allow-override
|
||||
$(if $(or $(findstring environment,$(origin $(1))),\
|
||||
$(findstring command line,$(origin $(1)))),,\
|
||||
$(eval $(1) = $(2)))
|
||||
endef
|
||||
|
||||
# Allow setting CC and AR and LD, or setting CROSS_COMPILE as a prefix.
|
||||
$(call allow-override,CC,$(CROSS_COMPILE)gcc)
|
||||
$(call allow-override,AR,$(CROSS_COMPILE)ar)
|
||||
$(call allow-override,LD,$(CROSS_COMPILE)ld)
|
||||
|
||||
PKG_CONFIG = $(CROSS_COMPILE)pkg-config
|
||||
|
||||
RM = rm -f
|
||||
|
|
|
|||
|
|
@ -521,6 +521,15 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
|
|||
goto out_child;
|
||||
}
|
||||
|
||||
/*
|
||||
* Normally perf_session__new would do this, but it doesn't have the
|
||||
* evlist.
|
||||
*/
|
||||
if (rec->tool.ordered_events && !perf_evlist__sample_id_all(rec->evlist)) {
|
||||
pr_warning("WARNING: No sample_id_all support, falling back to unordered processing\n");
|
||||
rec->tool.ordered_events = false;
|
||||
}
|
||||
|
||||
if (!rec->evlist->nr_groups)
|
||||
perf_header__clear_feat(&session->header, HEADER_GROUP_DESC);
|
||||
|
||||
|
|
@ -965,9 +974,11 @@ static struct record record = {
|
|||
.tool = {
|
||||
.sample = process_sample_event,
|
||||
.fork = perf_event__process_fork,
|
||||
.exit = perf_event__process_exit,
|
||||
.comm = perf_event__process_comm,
|
||||
.mmap = perf_event__process_mmap,
|
||||
.mmap2 = perf_event__process_mmap2,
|
||||
.ordered_events = true,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ static int read_counter(struct perf_evsel *counter)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void read_counters(bool close)
|
||||
static void read_counters(bool close_counters)
|
||||
{
|
||||
struct perf_evsel *counter;
|
||||
|
||||
|
|
@ -354,7 +354,7 @@ static void read_counters(bool close)
|
|||
if (process_counter(counter))
|
||||
pr_warning("failed to process counter %s\n", counter->name);
|
||||
|
||||
if (close) {
|
||||
if (close_counters) {
|
||||
perf_evsel__close_fd(counter, perf_evsel__nr_cpus(counter),
|
||||
thread_map__nr(evsel_list->threads));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -601,8 +601,8 @@ static void display_sig(int sig __maybe_unused)
|
|||
|
||||
static void display_setup_sig(void)
|
||||
{
|
||||
signal(SIGSEGV, display_sig);
|
||||
signal(SIGFPE, display_sig);
|
||||
signal(SIGSEGV, sighandler_dump_stack);
|
||||
signal(SIGFPE, sighandler_dump_stack);
|
||||
signal(SIGINT, display_sig);
|
||||
signal(SIGQUIT, display_sig);
|
||||
signal(SIGTERM, display_sig);
|
||||
|
|
|
|||
|
|
@ -638,7 +638,7 @@ ifndef DESTDIR
|
|||
prefix ?= $(HOME)
|
||||
endif
|
||||
bindir_relative = bin
|
||||
bindir = $(prefix)/$(bindir_relative)
|
||||
bindir = $(abspath $(prefix)/$(bindir_relative))
|
||||
mandir = share/man
|
||||
infodir = share/info
|
||||
perfexecdir = libexec/perf-core
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ static struct rb_node *hists__filter_entries(struct rb_node *nd,
|
|||
|
||||
static bool hist_browser__has_filter(struct hist_browser *hb)
|
||||
{
|
||||
return hists__has_filter(hb->hists) || hb->min_pcnt;
|
||||
return hists__has_filter(hb->hists) || hb->min_pcnt || symbol_conf.has_filter;
|
||||
}
|
||||
|
||||
static int hist_browser__get_folding(struct hist_browser *browser)
|
||||
|
|
|
|||
|
|
@ -143,6 +143,6 @@ $(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
|
|||
$(call rule_mkdir)
|
||||
$(call if_changed_dep,cc_o_c)
|
||||
|
||||
$(OUTPUT)util/hweight.o: ../../lib/hweight.c FORCE
|
||||
$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
|
||||
$(call rule_mkdir)
|
||||
$(call if_changed_dep,cc_o_c)
|
||||
|
|
|
|||
|
|
@ -53,11 +53,6 @@ int auxtrace_mmap__mmap(struct auxtrace_mmap *mm,
|
|||
{
|
||||
struct perf_event_mmap_page *pc = userpg;
|
||||
|
||||
#if BITS_PER_LONG != 64 && !defined(HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT)
|
||||
pr_err("Cannot use AUX area tracing mmaps\n");
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
WARN_ONCE(mm->base, "Uninitialized auxtrace_mmap\n");
|
||||
|
||||
mm->userpg = userpg;
|
||||
|
|
@ -73,6 +68,11 @@ int auxtrace_mmap__mmap(struct auxtrace_mmap *mm,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if BITS_PER_LONG != 64 && !defined(HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT)
|
||||
pr_err("Cannot use AUX area tracing mmaps\n");
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
pc->aux_offset = mp->offset;
|
||||
pc->aux_size = mp->len;
|
||||
|
||||
|
|
|
|||
|
|
@ -1387,6 +1387,24 @@ int machine__process_fork_event(struct machine *machine, union perf_event *event
|
|||
event->fork.ptid);
|
||||
int err = 0;
|
||||
|
||||
if (dump_trace)
|
||||
perf_event__fprintf_task(event, stdout);
|
||||
|
||||
/*
|
||||
* There may be an existing thread that is not actually the parent,
|
||||
* either because we are processing events out of order, or because the
|
||||
* (fork) event that would have removed the thread was lost. Assume the
|
||||
* latter case and continue on as best we can.
|
||||
*/
|
||||
if (parent->pid_ != (pid_t)event->fork.ppid) {
|
||||
dump_printf("removing erroneous parent thread %d/%d\n",
|
||||
parent->pid_, parent->tid);
|
||||
machine__remove_thread(machine, parent);
|
||||
thread__put(parent);
|
||||
parent = machine__findnew_thread(machine, event->fork.ppid,
|
||||
event->fork.ptid);
|
||||
}
|
||||
|
||||
/* if a thread currently exists for the thread id remove it */
|
||||
if (thread != NULL) {
|
||||
machine__remove_thread(machine, thread);
|
||||
|
|
@ -1395,8 +1413,6 @@ int machine__process_fork_event(struct machine *machine, union perf_event *event
|
|||
|
||||
thread = machine__findnew_thread(machine, event->fork.pid,
|
||||
event->fork.tid);
|
||||
if (dump_trace)
|
||||
perf_event__fprintf_task(event, stdout);
|
||||
|
||||
if (thread == NULL || parent == NULL ||
|
||||
thread__fork(thread, parent, sample->time) < 0) {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ util/ctype.c
|
|||
util/evlist.c
|
||||
util/evsel.c
|
||||
util/cpumap.c
|
||||
../../lib/hweight.c
|
||||
../lib/hweight.c
|
||||
util/thread_map.c
|
||||
util/util.c
|
||||
util/xyarray.c
|
||||
|
|
@ -19,5 +19,5 @@ util/rblist.c
|
|||
util/stat.c
|
||||
util/strlist.c
|
||||
util/trace-event.c
|
||||
../../lib/rbtree.c
|
||||
../lib/rbtree.c
|
||||
util/string.c
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ void perf_stat__update_shadow_stats(struct perf_evsel *counter, u64 *count,
|
|||
else if (perf_evsel__match(counter, HARDWARE, HW_CPU_CYCLES))
|
||||
update_stats(&runtime_cycles_stats[ctx][cpu], count[0]);
|
||||
else if (perf_stat_evsel__is(counter, CYCLES_IN_TX))
|
||||
update_stats(&runtime_transaction_stats[ctx][cpu], count[0]);
|
||||
update_stats(&runtime_cycles_in_tx_stats[ctx][cpu], count[0]);
|
||||
else if (perf_stat_evsel__is(counter, TRANSACTION_START))
|
||||
update_stats(&runtime_transaction_stats[ctx][cpu], count[0]);
|
||||
else if (perf_stat_evsel__is(counter, ELISION_START))
|
||||
|
|
@ -398,20 +398,18 @@ void perf_stat__print_shadow_stats(FILE *out, struct perf_evsel *evsel,
|
|||
" # %5.2f%% aborted cycles ",
|
||||
100.0 * ((total2-avg) / total));
|
||||
} else if (perf_stat_evsel__is(evsel, TRANSACTION_START) &&
|
||||
avg > 0 &&
|
||||
runtime_cycles_in_tx_stats[ctx][cpu].n != 0) {
|
||||
total = avg_stats(&runtime_cycles_in_tx_stats[ctx][cpu]);
|
||||
|
||||
if (total)
|
||||
if (avg)
|
||||
ratio = total / avg;
|
||||
|
||||
fprintf(out, " # %8.0f cycles / transaction ", ratio);
|
||||
} else if (perf_stat_evsel__is(evsel, ELISION_START) &&
|
||||
avg > 0 &&
|
||||
runtime_cycles_in_tx_stats[ctx][cpu].n != 0) {
|
||||
total = avg_stats(&runtime_cycles_in_tx_stats[ctx][cpu]);
|
||||
|
||||
if (total)
|
||||
if (avg)
|
||||
ratio = total / avg;
|
||||
|
||||
fprintf(out, " # %8.0f cycles / elision ", ratio);
|
||||
|
|
|
|||
|
|
@ -1911,6 +1911,8 @@ int setup_list(struct strlist **list, const char *list_str,
|
|||
pr_err("problems parsing %s list\n", list_name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
symbol_conf.has_filter = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -105,7 +105,8 @@ struct symbol_conf {
|
|||
demangle_kernel,
|
||||
filter_relative,
|
||||
show_hist_headers,
|
||||
branch_callstack;
|
||||
branch_callstack,
|
||||
has_filter;
|
||||
const char *vmlinux_name,
|
||||
*kallsyms_name,
|
||||
*source_prefix,
|
||||
|
|
|
|||
|
|
@ -191,6 +191,12 @@ static int thread__clone_map_groups(struct thread *thread,
|
|||
if (thread->pid_ == parent->pid_)
|
||||
return 0;
|
||||
|
||||
if (thread->mg == parent->mg) {
|
||||
pr_debug("broken map groups on thread %d/%d parent %d/%d\n",
|
||||
thread->pid_, thread->tid, parent->pid_, parent->tid);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* But this one is new process, copy maps. */
|
||||
for (i = 0; i < MAP__NR_TYPES; ++i)
|
||||
if (map_groups__clone(thread->mg, parent->mg, i) < 0)
|
||||
|
|
|
|||
|
|
@ -136,8 +136,7 @@ struct thread_map *thread_map__new_by_uid(uid_t uid)
|
|||
if (grow) {
|
||||
struct thread_map *tmp;
|
||||
|
||||
tmp = realloc(threads, (sizeof(*threads) +
|
||||
max_threads * sizeof(pid_t)));
|
||||
tmp = thread_map__realloc(threads, max_threads);
|
||||
if (tmp == NULL)
|
||||
goto out_free_namelist;
|
||||
|
||||
|
|
|
|||
|
|
@ -236,18 +236,16 @@ static struct dso *__machine__findnew_compat(struct machine *machine,
|
|||
const char *file_name;
|
||||
struct dso *dso;
|
||||
|
||||
pthread_rwlock_wrlock(&machine->dsos.lock);
|
||||
dso = __dsos__find(&machine->dsos, vdso_file->dso_name, true);
|
||||
if (dso)
|
||||
goto out_unlock;
|
||||
goto out;
|
||||
|
||||
file_name = vdso__get_compat_file(vdso_file);
|
||||
if (!file_name)
|
||||
goto out_unlock;
|
||||
goto out;
|
||||
|
||||
dso = __machine__addnew_vdso(machine, vdso_file->dso_name, file_name);
|
||||
out_unlock:
|
||||
pthread_rwlock_unlock(&machine->dsos.lock);
|
||||
out:
|
||||
return dso;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ int main(int argc, char *argv[])
|
|||
if (res > 0) {
|
||||
atomic_set(&requeued, 1);
|
||||
break;
|
||||
} else if (res > 0) {
|
||||
} else if (res < 0) {
|
||||
error("FUTEX_CMP_REQUEUE_PI failed\n", errno);
|
||||
ret = RET_ERROR;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue