Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263197
b: refs/heads/master
c: f70f975
h: refs/heads/master
i:
  263195: 77777b6
v: v3
  • Loading branch information
Linus Torvalds committed Aug 23, 2011
1 parent eda7220 commit 661fb3c
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f2b60717e692550bf753a5d64a5b69ea430fc832
refs/heads/master: f70f97546800c5dfaf8c580db90df02c824a937a
2 changes: 1 addition & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4971,7 +4971,7 @@ M: Paul Mackerras <paulus@samba.org>
M: Ingo Molnar <mingo@elte.hu>
M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
S: Supported
F: kernel/perf_event*.c
F: kernel/events/*
F: include/linux/perf_event.h
F: arch/*/kernel/perf_event*.c
F: arch/*/kernel/*/perf_event*.c
Expand Down
4 changes: 2 additions & 2 deletions trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
VERSION = 3
PATCHLEVEL = 1
SUBLEVEL = 0
EXTRAVERSION = -rc2
NAME = Wet Seal
EXTRAVERSION = -rc3
NAME = "Divemaster Edition"

# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/include/asm/xen/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ typedef struct xpaddr {
((unsigned long)((u64)CONFIG_XEN_MAX_DOMAIN_MEMORY * 1024 * 1024 * 1024 / PAGE_SIZE))

extern unsigned long *machine_to_phys_mapping;
extern unsigned int machine_to_phys_order;
extern unsigned long machine_to_phys_nr;

extern unsigned long get_phys_to_machine(unsigned long pfn);
extern bool set_phys_to_machine(unsigned long pfn, unsigned long mfn);
Expand Down Expand Up @@ -87,7 +87,7 @@ static inline unsigned long mfn_to_pfn(unsigned long mfn)
if (xen_feature(XENFEAT_auto_translated_physmap))
return mfn;

if (unlikely((mfn >> machine_to_phys_order) != 0)) {
if (unlikely(mfn >= machine_to_phys_nr)) {
pfn = ~0;
goto try_override;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/xen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \
grant-table.o suspend.o platform-pci-unplug.o \
p2m.o

obj-$(CONFIG_FTRACE) += trace.o
obj-$(CONFIG_EVENT_TRACING) += trace.o

obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.o
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ EXPORT_SYMBOL_GPL(xen_domain_type);

unsigned long *machine_to_phys_mapping = (void *)MACH2PHYS_VIRT_START;
EXPORT_SYMBOL(machine_to_phys_mapping);
unsigned int machine_to_phys_order;
EXPORT_SYMBOL(machine_to_phys_order);
unsigned long machine_to_phys_nr;
EXPORT_SYMBOL(machine_to_phys_nr);

struct start_info *xen_start_info;
EXPORT_SYMBOL_GPL(xen_start_info);
Expand Down
12 changes: 8 additions & 4 deletions trunk/arch/x86/xen/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1713,15 +1713,19 @@ static void __init xen_map_identity_early(pmd_t *pmd, unsigned long max_pfn)
void __init xen_setup_machphys_mapping(void)
{
struct xen_machphys_mapping mapping;
unsigned long machine_to_phys_nr_ents;

if (HYPERVISOR_memory_op(XENMEM_machphys_mapping, &mapping) == 0) {
machine_to_phys_mapping = (unsigned long *)mapping.v_start;
machine_to_phys_nr_ents = mapping.max_mfn + 1;
machine_to_phys_nr = mapping.max_mfn + 1;
} else {
machine_to_phys_nr_ents = MACH2PHYS_NR_ENTRIES;
machine_to_phys_nr = MACH2PHYS_NR_ENTRIES;
}
machine_to_phys_order = fls(machine_to_phys_nr_ents - 1);
#ifdef CONFIG_X86_32
if ((machine_to_phys_mapping + machine_to_phys_nr)
< machine_to_phys_mapping)
machine_to_phys_nr = (unsigned long *)NULL
- machine_to_phys_mapping;
#endif
}

#ifdef CONFIG_X86_64
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/xen/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,6 @@ static void __init xen_hvm_smp_prepare_cpus(unsigned int max_cpus)
native_smp_prepare_cpus(max_cpus);
WARN_ON(xen_smp_intr_init(0));

if (!xen_have_vector_callback)
return;
xen_init_lock_cpu(0);
xen_init_spinlocks();
}
Expand All @@ -546,6 +544,8 @@ static void xen_hvm_cpu_die(unsigned int cpu)

void __init xen_hvm_smp_init(void)
{
if (!xen_have_vector_callback)
return;
smp_ops.smp_prepare_cpus = xen_hvm_smp_prepare_cpus;
smp_ops.smp_send_reschedule = xen_smp_send_reschedule;
smp_ops.cpu_up = xen_hvm_cpu_up;
Expand Down
1 change: 0 additions & 1 deletion trunk/kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,6 @@ int request_threaded_irq(unsigned int irq, irq_handler_t handler,
if (!thread_fn)
return -EINVAL;
handler = irq_default_primary_handler;
irqflags |= IRQF_ONESHOT;
}

action = kzalloc(sizeof(struct irqaction), GFP_KERNEL);
Expand Down
4 changes: 3 additions & 1 deletion trunk/tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static int freq = 1000;
static int output;
static int pipe_output = 0;
static const char *output_name = NULL;
static int group = 0;
static bool group = false;
static int realtime_prio = 0;
static bool nodelay = false;
static bool raw_samples = false;
Expand Down Expand Up @@ -753,6 +753,8 @@ const struct option record_options[] = {
"child tasks do not inherit counters"),
OPT_UINTEGER('F', "freq", &user_freq, "profile at this frequency"),
OPT_UINTEGER('m', "mmap-pages", &mmap_pages, "number of mmap data pages"),
OPT_BOOLEAN(0, "group", &group,
"put the counters into a counter group"),
OPT_BOOLEAN('g', "call-graph", &call_graph,
"do call-graph (stack chain/backtrace) recording"),
OPT_INCR('v', "verbose", &verbose,
Expand Down
7 changes: 5 additions & 2 deletions trunk/tools/perf/builtin-stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ static int big_num_opt = -1;
static const char *cpu_list;
static const char *csv_sep = NULL;
static bool csv_output = false;
static bool group = false;

static volatile int done = 0;

Expand Down Expand Up @@ -280,14 +281,14 @@ static int create_perf_stat_counter(struct perf_evsel *evsel)
attr->inherit = !no_inherit;

if (system_wide)
return perf_evsel__open_per_cpu(evsel, evsel_list->cpus, false);
return perf_evsel__open_per_cpu(evsel, evsel_list->cpus, group);

if (target_pid == -1 && target_tid == -1) {
attr->disabled = 1;
attr->enable_on_exec = 1;
}

return perf_evsel__open_per_thread(evsel, evsel_list->threads, false);
return perf_evsel__open_per_thread(evsel, evsel_list->threads, group);
}

/*
Expand Down Expand Up @@ -1043,6 +1044,8 @@ static const struct option options[] = {
"stat events on existing thread id"),
OPT_BOOLEAN('a', "all-cpus", &system_wide,
"system-wide collection from all CPUs"),
OPT_BOOLEAN('g', "group", &group,
"put the counters into a counter group"),
OPT_BOOLEAN('c', "scale", &scale,
"scale/normalize counters"),
OPT_INCR('v', "verbose", &verbose,
Expand Down
11 changes: 10 additions & 1 deletion trunk/tools/perf/util/evlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,19 @@ int perf_evlist__add_default(struct perf_evlist *evlist)
struct perf_evsel *evsel = perf_evsel__new(&attr, 0);

if (evsel == NULL)
return -ENOMEM;
goto error;

/* use strdup() because free(evsel) assumes name is allocated */
evsel->name = strdup("cycles");
if (!evsel->name)
goto error_free;

perf_evlist__add(evlist, evsel);
return 0;
error_free:
perf_evsel__delete(evsel);
error:
return -ENOMEM;
}

void perf_evlist__disable(struct perf_evlist *evlist)
Expand Down
2 changes: 2 additions & 0 deletions trunk/tools/perf/util/include/linux/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
#define __always_inline inline
#endif
#define __user
#ifndef __attribute_const__
#define __attribute_const__
#endif

#define __used __attribute__((__unused__))

Expand Down
8 changes: 5 additions & 3 deletions trunk/tools/perf/util/parse-events.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,11 @@ parse_raw_event(const char **strp, struct perf_event_attr *attr)
return EVT_FAILED;
n = hex2u64(str + 1, &config);
if (n > 0) {
*strp = str + n + 1;
const char *end = str + n + 1;
if (*end != '\0' && *end != ',' && *end != ':')
return EVT_FAILED;

*strp = end;
attr->type = PERF_TYPE_RAW;
attr->config = config;
return EVT_HANDLED;
Expand Down Expand Up @@ -1097,6 +1101,4 @@ void print_events(const char *event_glob)
printf("\n");

print_tracepoint_events(NULL, NULL);

exit(129);
}

0 comments on commit 661fb3c

Please sign in to comment.