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

Commit 4b17cafa authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'perf-fixes-for-linus' of...

Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (30 commits)
  perf: Add back list_head data types
  perf ui hist browser: Fixup key bindings
  perf ui browser: Add ui_browser__show counterpart: __hide
  perf annotate: Cycle thru sorted lines with samples
  perf ui: Make SPACE work as PGDN in all browsers
  perf annotate: Sort by hottest lines in the TUI
  perf ui: Complete the breakdown of util/newt.c
  perf ui: Move hists browser to util/ui/browsers/
  perf symbols: Ignore mapping symbols on ARM
  perf ui: Move map browser to util/ui/browsers/
  perf ui: Move annotate browser to util/ui/browsers/
  perf ui: Move ui_progress routines to separate file in util/ui/
  perf ui: Move ui_helpline routines to separate file in util/ui/
  perf ui: Shorten ui_browser member names
  perf, x86: P4 PMU -- update nmi irq statistics and unmask lvt entry properly
  perf ui: Start breaking down newt.c into multiple files
  perf tui: Introduce list_head based generic ui_browser refresh routine
  perf probe: Fix memory leaks in add_perf_probe_events
  perf probe: Fix to copy the type for raw parameters
  perf report: Speed up exit path
  ...
parents 36450e9c 88d89da6
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -656,6 +656,7 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)
	cpuc = &__get_cpu_var(cpu_hw_events);

	for (idx = 0; idx < x86_pmu.num_counters; idx++) {
		int overflow;

		if (!test_bit(idx, cpuc->active_mask))
			continue;
@@ -666,12 +667,14 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)
		WARN_ON_ONCE(hwc->idx != idx);

		/* it might be unflagged overflow */
		handled = p4_pmu_clear_cccr_ovf(hwc);
		overflow = p4_pmu_clear_cccr_ovf(hwc);

		val = x86_perf_event_update(event);
		if (!handled && (val & (1ULL << (x86_pmu.cntval_bits - 1))))
		if (!overflow && (val & (1ULL << (x86_pmu.cntval_bits - 1))))
			continue;

		handled += overflow;

		/* event overflow for sure */
		data.period = event->hw.last_period;

@@ -687,7 +690,7 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)
		inc_irq_stat(apic_perf_irqs);
	}

	return handled;
	return handled > 0;
}

/*
+1 −0
Original line number Diff line number Diff line
@@ -668,6 +668,7 @@ static int __init ppro_init(char **cpu_type)
		*cpu_type = "i386/core_2";
		break;
	case 0x1a:
	case 0x1e:
	case 0x2e:
		spec = &op_arch_perfmon_spec;
		*cpu_type = "i386/core_i7";
+26 −5
Original line number Diff line number Diff line
@@ -157,9 +157,8 @@ all::
#
# Define NO_DWARF if you do not want debug-info analysis feature at all.

$(shell sh -c 'mkdir -p $(OUTPUT)scripts/python/Perf-Trace-Util/' 2> /dev/null)
$(shell sh -c 'mkdir -p $(OUTPUT)scripts/perl/Perf-Trace-Util/' 2> /dev/null)
$(shell sh -c 'mkdir -p $(OUTPUT)util/scripting-engines/' 2> /dev/null)
$(shell sh -c 'mkdir -p $(OUTPUT)scripts/{perl,python}/Perf-Trace-Util/' 2> /dev/null)
$(shell sh -c 'mkdir -p $(OUTPUT)util/{ui/browsers,scripting-engines}/' 2> /dev/null)
$(shell sh -c 'mkdir $(OUTPUT)bench' 2> /dev/null)

$(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE
@@ -568,7 +567,20 @@ else
		# Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h
		BASIC_CFLAGS += -I/usr/include/slang
		EXTLIBS += -lnewt -lslang
		LIB_OBJS += $(OUTPUT)util/newt.o
		LIB_OBJS += $(OUTPUT)util/ui/setup.o
		LIB_OBJS += $(OUTPUT)util/ui/browser.o
		LIB_OBJS += $(OUTPUT)util/ui/browsers/annotate.o
		LIB_OBJS += $(OUTPUT)util/ui/browsers/hists.o
		LIB_OBJS += $(OUTPUT)util/ui/browsers/map.o
		LIB_OBJS += $(OUTPUT)util/ui/helpline.o
		LIB_OBJS += $(OUTPUT)util/ui/progress.o
		LIB_OBJS += $(OUTPUT)util/ui/util.o
		LIB_H += util/ui/browser.h
		LIB_H += util/ui/browsers/map.h
		LIB_H += util/ui/helpline.h
		LIB_H += util/ui/libslang.h
		LIB_H += util/ui/progress.h
		LIB_H += util/ui/util.h
	endif
endif

@@ -966,7 +978,16 @@ $(OUTPUT)builtin-init-db.o: builtin-init-db.c $(OUTPUT)PERF-CFLAGS
$(OUTPUT)util/config.o: util/config.c $(OUTPUT)PERF-CFLAGS
	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $<

$(OUTPUT)util/newt.o: util/newt.c $(OUTPUT)PERF-CFLAGS
$(OUTPUT)util/ui/browser.o: util/ui/browser.c $(OUTPUT)PERF-CFLAGS
	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DENABLE_SLFUTURE_CONST $<

$(OUTPUT)util/ui/browsers/annotate.o: util/ui/browsers/annotate.c $(OUTPUT)PERF-CFLAGS
	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DENABLE_SLFUTURE_CONST $<

$(OUTPUT)util/ui/browsers/hists.o: util/ui/browsers/hists.c $(OUTPUT)PERF-CFLAGS
	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DENABLE_SLFUTURE_CONST $<

$(OUTPUT)util/ui/browsers/map.o: util/ui/browsers/map.c $(OUTPUT)PERF-CFLAGS
	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DENABLE_SLFUTURE_CONST $<

$(OUTPUT)util/rbtree.o: ../../lib/rbtree.c $(OUTPUT)PERF-CFLAGS
+1 −1
Original line number Diff line number Diff line
@@ -285,7 +285,7 @@ static int hist_entry__tty_annotate(struct hist_entry *he)
	LIST_HEAD(head);
	struct objdump_line *pos, *n;

	if (hist_entry__annotate(he, &head) < 0)
	if (hist_entry__annotate(he, &head, 0) < 0)
		return -1;

	if (full_paths)
+29 −2
Original line number Diff line number Diff line
@@ -348,7 +348,18 @@ static int __cmd_report(void)
		hists__tty_browse_tree(&session->hists_tree, help);

out_delete:
	perf_session__delete(session);
	/*
	 * Speed up the exit process, for large files this can
	 * take quite a while.
	 *
	 * XXX Enable this when using valgrind or if we ever
	 * librarize this command.
	 *
	 * Also experiment with obstacks to see how much speed
	 * up we'll get here.
	 *
 	 * perf_session__delete(session);
 	 */
	return ret;
}

@@ -478,8 +489,24 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
	 * so don't allocate extra space that won't be used in the stdio
	 * implementation.
	 */
	if (use_browser > 0)
	if (use_browser > 0) {
		symbol_conf.priv_size = sizeof(struct sym_priv);
		/*
 		 * For searching by name on the "Browse map details".
 		 * providing it only in verbose mode not to bloat too
 		 * much struct symbol.
 		 */
		if (verbose) {
			/*
			 * XXX: Need to provide a less kludgy way to ask for
			 * more space per symbol, the u32 is for the index on
			 * the ui browser.
			 * See symbol__browser_index.
			 */
			symbol_conf.priv_size += sizeof(u32);
			symbol_conf.sort_by_name = true;
		}
	}

	if (symbol__init() < 0)
		return -1;
Loading