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

Commit f4eccb6d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

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

* 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf_counter, powerpc, sparc: Fix compilation after perf_counter_overflow() change
  perf_counter: x86: Fix PMU resource leak
  perf util: SVG performance improvements
  perf util: Make the timechart SVG width dynamic
  perf timechart: Show the duration of scheduler delays in the SVG
  perf timechart: Show the name of the waker/wakee in timechart
parents 8e4bc3dd cd74c86b
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -1162,7 +1162,6 @@ static void record_and_restart(struct perf_counter *counter, unsigned long val,
	 */
	 */
	if (record) {
	if (record) {
		struct perf_sample_data data = {
		struct perf_sample_data data = {
			.regs	= regs,
			.addr	= 0,
			.addr	= 0,
			.period	= counter->hw.last_period,
			.period	= counter->hw.last_period,
		};
		};
@@ -1170,7 +1169,7 @@ static void record_and_restart(struct perf_counter *counter, unsigned long val,
		if (counter->attr.sample_type & PERF_SAMPLE_ADDR)
		if (counter->attr.sample_type & PERF_SAMPLE_ADDR)
			perf_get_data_addr(regs, &data.addr);
			perf_get_data_addr(regs, &data.addr);


		if (perf_counter_overflow(counter, nmi, &data)) {
		if (perf_counter_overflow(counter, nmi, &data, regs)) {
			/*
			/*
			 * Interrupts are coming too fast - throttle them
			 * Interrupts are coming too fast - throttle them
			 * by setting the counter to 0, so it will be
			 * by setting the counter to 0, so it will be
+1 −2
Original line number Original line Diff line number Diff line
@@ -493,7 +493,6 @@ static int __kprobes perf_counter_nmi_handler(struct notifier_block *self,


	regs = args->regs;
	regs = args->regs;


	data.regs = regs;
	data.addr = 0;
	data.addr = 0;


	cpuc = &__get_cpu_var(cpu_hw_counters);
	cpuc = &__get_cpu_var(cpu_hw_counters);
@@ -513,7 +512,7 @@ static int __kprobes perf_counter_nmi_handler(struct notifier_block *self,
		if (!sparc_perf_counter_set_period(counter, hwc, idx))
		if (!sparc_perf_counter_set_period(counter, hwc, idx))
			continue;
			continue;


		if (perf_counter_overflow(counter, 1, &data))
		if (perf_counter_overflow(counter, 1, &data, regs))
			sparc_pmu_disable_counter(hwc, idx);
			sparc_pmu_disable_counter(hwc, idx);
	}
	}


+6 −3
Original line number Original line Diff line number Diff line
@@ -924,6 +924,8 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
	if (err)
	if (err)
		return err;
		return err;


	counter->destroy = hw_perf_counter_destroy;

	/*
	/*
	 * Generate PMC IRQs:
	 * Generate PMC IRQs:
	 * (keep 'enabled' bit clear for now)
	 * (keep 'enabled' bit clear for now)
@@ -953,8 +955,6 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
			return -EOPNOTSUPP;
			return -EOPNOTSUPP;
	}
	}


	counter->destroy = hw_perf_counter_destroy;

	/*
	/*
	 * Raw event type provide the config in the event structure
	 * Raw event type provide the config in the event structure
	 */
	 */
@@ -2107,8 +2107,11 @@ const struct pmu *hw_perf_counter_init(struct perf_counter *counter)
	int err;
	int err;


	err = __hw_perf_counter_init(counter);
	err = __hw_perf_counter_init(counter);
	if (err)
	if (err) {
		if (counter->destroy)
			counter->destroy(counter);
		return ERR_PTR(err);
		return ERR_PTR(err);
	}


	return &pmu;
	return &pmu;
}
}
+0 −17
Original line number Original line Diff line number Diff line
@@ -849,23 +849,6 @@ static inline void perf_counter_comm(struct task_struct *tsk) { }
static inline void perf_counter_fork(struct task_struct *tsk)		{ }
static inline void perf_counter_fork(struct task_struct *tsk)		{ }
static inline void perf_counter_init(void)				{ }
static inline void perf_counter_init(void)				{ }


static inline int
perf_output_begin(struct perf_output_handle *handle, struct perf_counter *c,
		  unsigned int size, int nmi, int sample)		{ }
static inline void perf_output_end(struct perf_output_handle *handle)	{ }
static inline void
perf_output_copy(struct perf_output_handle *handle,
		 const void *buf, unsigned int len)			{ }
static inline void
perf_output_sample(struct perf_output_handle *handle,
		   struct perf_event_header *header,
		   struct perf_sample_data *data,
		   struct perf_counter *counter)			{ }
static inline void
perf_prepare_sample(struct perf_event_header *header,
		    struct perf_sample_data *data,
		    struct perf_counter *counter,
		    struct pt_regs *regs)				{ }
#endif
#endif


#define perf_output_put(handle, x) \
#define perf_output_put(handle, x) \
+3 −0
Original line number Original line Diff line number Diff line
@@ -28,6 +28,9 @@ OPTIONS
-i::
-i::
--input=::
--input=::
        Select the input file (default: perf.data)
        Select the input file (default: perf.data)
-w::
--width=::
        Select the width of the SVG file (default: 1000)




SEE ALSO
SEE ALSO
Loading