linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/2] perf stat: add interval counter printing
@ 2013-01-22 13:18 Stephane Eranian
  2013-01-22 13:18 ` [PATCH v6 1/2] perf tools: add evsel prev_raw_count field Stephane Eranian
  2013-01-22 13:18 ` [PATCH v6 2/2] perf stat: add interval printing Stephane Eranian
  0 siblings, 2 replies; 13+ messages in thread
From: Stephane Eranian @ 2013-01-22 13:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, mingo, ak, acme, jolsa, namhyung.kim

This small patchset extends perf stat with the -I option.

The -I option enables interval printing. It expects
an interval duration in milliseconds. Minimum is
100ms. Once, activated perf stat prints events deltas
since last printout. All modes are supported.

$ perf stat -I 1000 -e cycles noploop 10
noploop for 10 seconds
 #           time             counts events
      1.000109853      2,388,560,546 cycles
      2.000262846      2,393,332,358 cycles
      3.000354131      2,393,176,537 cycles
      4.000439503      2,393,203,790 cycles
      5.000527075      2,393,167,675 cycles
      6.000609052      2,393,203,670 cycles
      7.000691082      2,393,175,678 cycles

The output format makes it easy to feed into a plotting program
such as gnuplot when the -I option is used in combination with the -x
option:

$ perf stat -x, -I 1000 -e cycles noploop 10
noploop for 10 seconds
1.000084113,2378775498,cycles
2.000245798,2391056897,cycles
3.000354445,2392089414,cycles
4.000459115,2390936603,cycles
5.000565341,2392108173,cycles

The first patch adds the code to keep previous counts. The second
is the actual extension of perf stat.

In v2, we changed the option from -T to -I based on feedback
from Andi Kleen (who is using -T in an upcoming patch).

In v3, added compute_deltas() to evsel.c to factorize
deltas computation based on Jiri's comments.

In v4, we made sure that counts are printed in case
the run is interrupted by CTRL-C based on Andi Kleen's
feedback.

In v5, we added the column headings printed every 25 lines.
Cleaned up the code some more based on Namhyung's comments.

In v6, we simplify print_stat() by dropping the useless
check for interval as noted by Namhyung Kim. We also
rebase to 3.8.0-rc4.

Stephane Eranian (2):
  perf tools: add evsel prev_raw_count field
  perf stat: add interval printing

 tools/perf/Documentation/perf-stat.txt |    4 +
 tools/perf/builtin-stat.c              |  157 +++++++++++++++++++++++++++++---
 tools/perf/util/evsel.c                |   26 ++++++
 tools/perf/util/evsel.h                |    1 +
 4 files changed, 173 insertions(+), 15 deletions(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v6 1/2] perf tools: add evsel prev_raw_count field
  2013-01-22 13:18 [PATCH v6 0/2] perf stat: add interval counter printing Stephane Eranian
@ 2013-01-22 13:18 ` Stephane Eranian
  2013-01-22 13:18 ` [PATCH v6 2/2] perf stat: add interval printing Stephane Eranian
  1 sibling, 0 replies; 13+ messages in thread
From: Stephane Eranian @ 2013-01-22 13:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, mingo, ak, acme, jolsa, namhyung.kim

This field will be used by commands which print
counter deltas on regular timer intervals,
such as perf stat -I.

Signed-off-by: Stephane Eranian <eranian@google.com>
---
 tools/perf/util/evsel.c |   26 ++++++++++++++++++++++++++
 tools/perf/util/evsel.h |    1 +
 2 files changed, 27 insertions(+)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 1b16dd1..371e93d 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -631,6 +631,28 @@ void perf_evsel__delete(struct perf_evsel *evsel)
 	free(evsel);
 }
 
+static inline void compute_deltas(struct perf_evsel *evsel,
+				  int cpu,
+				  struct perf_counts_values *count)
+{
+	struct perf_counts_values tmp;
+
+	if (!evsel->prev_raw_counts)
+		return;
+
+	if (cpu == -1) {
+		tmp = evsel->prev_raw_counts->aggr;
+		evsel->prev_raw_counts->aggr = *count;
+	} else {
+		tmp = evsel->prev_raw_counts->cpu[cpu];
+		evsel->prev_raw_counts->cpu[cpu] = *count;
+	}
+
+	count->val = count->val - tmp.val;
+	count->ena = count->ena - tmp.ena;
+	count->run = count->run - tmp.run;
+}
+
 int __perf_evsel__read_on_cpu(struct perf_evsel *evsel,
 			      int cpu, int thread, bool scale)
 {
@@ -646,6 +668,8 @@ int __perf_evsel__read_on_cpu(struct perf_evsel *evsel,
 	if (readn(FD(evsel, cpu, thread), &count, nv * sizeof(u64)) < 0)
 		return -errno;
 
+	compute_deltas(evsel, cpu, &count);
+
 	if (scale) {
 		if (count.run == 0)
 			count.val = 0;
@@ -684,6 +708,8 @@ int __perf_evsel__read(struct perf_evsel *evsel,
 		}
 	}
 
+	compute_deltas(evsel, -1, aggr);
+
 	evsel->counts->scaled = 0;
 	if (scale) {
 		if (aggr->run == 0) {
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 3d2b801..63ea570 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -53,6 +53,7 @@ struct perf_evsel {
 	struct xyarray		*sample_id;
 	u64			*id;
 	struct perf_counts	*counts;
+	struct perf_counts	*prev_raw_counts;
 	int			idx;
 	u32			ids;
 	struct hists		hists;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v6 2/2] perf stat: add interval printing
  2013-01-22 13:18 [PATCH v6 0/2] perf stat: add interval counter printing Stephane Eranian
  2013-01-22 13:18 ` [PATCH v6 1/2] perf tools: add evsel prev_raw_count field Stephane Eranian
@ 2013-01-22 13:18 ` Stephane Eranian
  2013-01-24  9:39   ` Ingo Molnar
  2013-01-25  2:52   ` Arnaldo Carvalho de Melo
  1 sibling, 2 replies; 13+ messages in thread
From: Stephane Eranian @ 2013-01-22 13:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, mingo, ak, acme, jolsa, namhyung.kim

This patch adds a new printing mode for perf stat.
It allows internval printing. That means perf stat
can now print event deltas at regular time interval.
This is useful to detect phases in programs.

The -I option enables interval printing. It expects
an interval duration in milliseconds. Minimum is
100ms. Once, activated perf stat prints events deltas
since last printout. All modes are supported.

$ perf stat -I 1000 -e cycles noploop 10
noploop for 10 seconds
 #           time             counts events
      1.000109853      2,388,560,546 cycles
      2.000262846      2,393,332,358 cycles
      3.000354131      2,393,176,537 cycles
      4.000439503      2,393,203,790 cycles
      5.000527075      2,393,167,675 cycles
      6.000609052      2,393,203,670 cycles
      7.000691082      2,393,175,678 cycles

The output format makes it easy to feed into a plotting program
such as gnuplot when the -I option is used in combination with the -x
option:

$ perf stat -x, -I 1000 -e cycles noploop 10
noploop for 10 seconds
1.000084113,2378775498,cycles
2.000245798,2391056897,cycles
3.000354445,2392089414,cycles
4.000459115,2390936603,cycles
5.000565341,2392108173,cycles

Signed-off-by: Stephane Eranian <eranian@google.com>
---
 tools/perf/Documentation/perf-stat.txt |    4 +
 tools/perf/builtin-stat.c              |  157 +++++++++++++++++++++++++++++---
 2 files changed, 146 insertions(+), 15 deletions(-)

diff --git a/tools/perf/Documentation/perf-stat.txt b/tools/perf/Documentation/perf-stat.txt
index cf0c310..5289da3 100644
--- a/tools/perf/Documentation/perf-stat.txt
+++ b/tools/perf/Documentation/perf-stat.txt
@@ -114,6 +114,10 @@ Log output to fd, instead of stderr.  Complementary to --output, and mutually ex
 
 perf stat --repeat 10 --null --sync --pre 'make -s O=defconfig-build/clean' -- make -s -j64 O=defconfig-build/ bzImage
 
+-I msecs::
+--interval-print msecs::
+	print count deltas every N milliseconds (minimum: 100ms)
+	example: perf stat -I 1000 -e cycles -a sleep 5
 
 EXAMPLES
 --------
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index c247fac..d29a9b7 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -65,6 +65,10 @@
 #define CNTR_NOT_SUPPORTED	"<not supported>"
 #define CNTR_NOT_COUNTED	"<not counted>"
 
+static void print_stat(int argc, const char **argv);
+static void print_counter_aggr(struct perf_evsel *counter, char *prefix);
+static void print_counter(struct perf_evsel *counter, char *prefix);
+
 static struct perf_evlist	*evsel_list;
 
 static struct perf_target	target = {
@@ -87,6 +91,8 @@ static FILE			*output				= NULL;
 static const char		*pre_cmd			= NULL;
 static const char		*post_cmd			= NULL;
 static bool			sync_run			= false;
+static unsigned int		interval			= 0;
+static struct timespec		ref_time;
 
 static volatile int done = 0;
 
@@ -94,6 +100,28 @@ struct perf_stat {
 	struct stats	  res_stats[3];
 };
 
+static inline void diff_timespec(struct timespec *r, struct timespec *a,
+				 struct timespec *b)
+{
+	r->tv_sec = a->tv_sec - b->tv_sec;
+	if (a->tv_nsec < b->tv_nsec) {
+		r->tv_nsec = a->tv_nsec + 1000000000L - b->tv_nsec;
+		r->tv_sec--;
+	} else {
+		r->tv_nsec = a->tv_nsec - b->tv_nsec ;
+	}
+}
+
+static inline struct cpu_map *perf_evsel__cpus(struct perf_evsel *evsel)
+{
+	return (evsel->cpus && !target.cpu_list) ? evsel->cpus : evsel_list->cpus;
+}
+
+static inline int perf_evsel__nr_cpus(struct perf_evsel *evsel)
+{
+	return perf_evsel__cpus(evsel)->nr;
+}
+
 static int perf_evsel__alloc_stat_priv(struct perf_evsel *evsel)
 {
 	evsel->priv = zalloc(sizeof(struct perf_stat));
@@ -106,14 +134,27 @@ static void perf_evsel__free_stat_priv(struct perf_evsel *evsel)
 	evsel->priv = NULL;
 }
 
-static inline struct cpu_map *perf_evsel__cpus(struct perf_evsel *evsel)
+static int perf_evsel__alloc_prev_raw_counts(struct perf_evsel *evsel)
 {
-	return (evsel->cpus && !target.cpu_list) ? evsel->cpus : evsel_list->cpus;
+	void *addr;
+	size_t sz;
+
+	sz = sizeof(*evsel->counts) +
+	     (perf_evsel__nr_cpus(evsel) * sizeof(struct perf_counts_values));
+
+	addr = zalloc(sz);
+	if (!addr)
+		return -ENOMEM;
+
+	evsel->prev_raw_counts =  addr;
+
+	return 0;
 }
 
-static inline int perf_evsel__nr_cpus(struct perf_evsel *evsel)
+static void perf_evsel__free_prev_raw_counts(struct perf_evsel *evsel)
 {
-	return perf_evsel__cpus(evsel)->nr;
+	free(evsel->prev_raw_counts);
+	evsel->prev_raw_counts = NULL;
 }
 
 static struct stats runtime_nsecs_stats[MAX_NR_CPUS];
@@ -269,15 +310,68 @@ static int read_counter(struct perf_evsel *counter)
 	return 0;
 }
 
+static void print_interval(void)
+{
+	static int num_print_interval;
+	struct perf_evsel *counter;
+	struct perf_stat *ps;
+	struct timespec ts, rs;
+	char prefix[64];
+
+	if (no_aggr) {
+		list_for_each_entry(counter, &evsel_list->entries, node) {
+			ps = counter->priv;
+			memset(ps->res_stats, 0, sizeof(ps->res_stats));
+			read_counter(counter);
+		}
+	} else {
+		list_for_each_entry(counter, &evsel_list->entries, node) {
+			ps = counter->priv;
+			memset(ps->res_stats, 0, sizeof(ps->res_stats));
+			read_counter_aggr(counter);
+		}
+	}
+	clock_gettime(CLOCK_MONOTONIC, &ts);
+	diff_timespec(&rs, &ts, &ref_time);
+	sprintf(prefix, "%6lu.%09lu%s", rs.tv_sec, rs.tv_nsec, csv_sep);
+
+	if (num_print_interval == 0 && !csv_output) {
+		if (no_aggr)
+			fprintf(output, "#           time CPU                 counts events\n");
+		else
+			fprintf(output, "#           time             counts events\n");
+	}
+
+	if (++num_print_interval == 25)
+		num_print_interval = 0;
+
+	if (no_aggr) {
+		list_for_each_entry(counter, &evsel_list->entries, node)
+			print_counter(counter, prefix);
+	} else {
+		list_for_each_entry(counter, &evsel_list->entries, node)
+			print_counter_aggr(counter, prefix);
+	}
+}
+
 static int __run_perf_stat(int argc __maybe_unused, const char **argv)
 {
 	unsigned long long t0, t1;
 	struct perf_evsel *counter;
+	struct timespec ts;
 	int status = 0;
 	int child_ready_pipe[2], go_pipe[2];
 	const bool forks = (argc > 0);
 	char buf;
 
+	if (interval) {
+		ts.tv_sec  = interval / 1000;
+		ts.tv_nsec = (interval % 1000) * 1000000;
+	} else {
+		ts.tv_sec  = 1;
+		ts.tv_nsec = 0;
+	}
+
 	if (forks && (pipe(child_ready_pipe) < 0 || pipe(go_pipe) < 0)) {
 		perror("failed to create pipes");
 		return -1;
@@ -377,14 +471,25 @@ static int __run_perf_stat(int argc __maybe_unused, const char **argv)
 	 * Enable counters and exec the command:
 	 */
 	t0 = rdclock();
+	clock_gettime(CLOCK_MONOTONIC, &ref_time);
 
 	if (forks) {
 		close(go_pipe[1]);
+		if (interval) {
+			while (!waitpid(child_pid, &status, WNOHANG)) {
+				nanosleep(&ts, NULL);
+				print_interval();
+			}
+		}
 		wait(&status);
 		if (WIFSIGNALED(status))
 			psignal(WTERMSIG(status), argv[0]);
 	} else {
-		while(!done) sleep(1);
+		while (!done) {
+			nanosleep(&ts, NULL);
+			if (interval)
+				print_interval();
+		}
 	}
 
 	t1 = rdclock();
@@ -470,7 +575,7 @@ static void nsec_printout(int cpu, struct perf_evsel *evsel, double avg)
 	if (evsel->cgrp)
 		fprintf(output, "%s%s", csv_sep, evsel->cgrp->name);
 
-	if (csv_output)
+	if (csv_output || interval)
 		return;
 
 	if (perf_evsel__match(evsel, SOFTWARE, SW_TASK_CLOCK))
@@ -684,12 +789,11 @@ static void abs_printout(int cpu, struct perf_evsel *evsel, double avg)
 	if (evsel->cgrp)
 		fprintf(output, "%s%s", csv_sep, evsel->cgrp->name);
 
-	if (csv_output)
+	if (csv_output || interval)
 		return;
 
 	if (perf_evsel__match(evsel, HARDWARE, HW_INSTRUCTIONS)) {
 		total = avg_stats(&runtime_cycles_stats[cpu]);
-
 		if (total)
 			ratio = avg / total;
 
@@ -783,12 +887,15 @@ static void abs_printout(int cpu, struct perf_evsel *evsel, double avg)
  * Print out the results of a single counter:
  * aggregated counts in system-wide mode
  */
-static void print_counter_aggr(struct perf_evsel *counter)
+static void print_counter_aggr(struct perf_evsel *counter, char *prefix)
 {
 	struct perf_stat *ps = counter->priv;
 	double avg = avg_stats(&ps->res_stats[0]);
 	int scaled = counter->counts->scaled;
 
+	if (prefix)
+		fprintf(output, "%s", prefix);
+
 	if (scaled == -1) {
 		fprintf(output, "%*s%s%*s",
 			csv_output ? 0 : 18,
@@ -831,7 +938,7 @@ static void print_counter_aggr(struct perf_evsel *counter)
  * Print out the results of a single counter:
  * does not use aggregated count in system-wide
  */
-static void print_counter(struct perf_evsel *counter)
+static void print_counter(struct perf_evsel *counter, char *prefix)
 {
 	u64 ena, run, val;
 	int cpu;
@@ -840,6 +947,10 @@ static void print_counter(struct perf_evsel *counter)
 		val = counter->counts->cpu[cpu].val;
 		ena = counter->counts->cpu[cpu].ena;
 		run = counter->counts->cpu[cpu].run;
+
+		if (prefix)
+			fprintf(output, "%s", prefix);
+
 		if (run == 0 || ena == 0) {
 			fprintf(output, "CPU%*d%s%*s%s%*s",
 				csv_output ? 0 : -4,
@@ -901,10 +1012,10 @@ static void print_stat(int argc, const char **argv)
 
 	if (no_aggr) {
 		list_for_each_entry(counter, &evsel_list->entries, node)
-			print_counter(counter);
+			print_counter(counter, NULL);
 	} else {
 		list_for_each_entry(counter, &evsel_list->entries, node)
-			print_counter_aggr(counter);
+			print_counter_aggr(counter, NULL);
 	}
 
 	if (!csv_output) {
@@ -925,7 +1036,7 @@ static volatile int signr = -1;
 
 static void skip_signal(int signo)
 {
-	if(child_pid == -1)
+	if ((child_pid == -1) || interval)
 		done = 1;
 
 	signr = signo;
@@ -1145,6 +1256,8 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
 			"command to run prior to the measured command"),
 	OPT_STRING(0, "post", &post_cmd, "command",
 			"command to run after to the measured command"),
+	OPT_UINTEGER('I', "interval-print", &interval,
+		    "print counts at regular interval in ms (>= 100)"),
 	OPT_END()
 	};
 	const char * const stat_usage[] = {
@@ -1245,12 +1358,23 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
 		usage_with_options(stat_usage, options);
 		return -1;
 	}
+	if (interval && interval < 100) {
+		pr_err("print interval must be >= 100ms\n");
+		usage_with_options(stat_usage, options);
+		return -1;
+	}
 
 	list_for_each_entry(pos, &evsel_list->entries, node) {
 		if (perf_evsel__alloc_stat_priv(pos) < 0 ||
 		    perf_evsel__alloc_counts(pos, perf_evsel__nr_cpus(pos)) < 0)
 			goto out_free_fd;
 	}
+	if (interval) {
+		list_for_each_entry(pos, &evsel_list->entries, node) {
+			if (perf_evsel__alloc_prev_raw_counts(pos) < 0)
+				goto out_free_fd;
+		}
+	}
 
 	/*
 	 * We dont want to block the signals - that would cause
@@ -1260,6 +1384,7 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
 	 */
 	atexit(sig_atexit);
 	signal(SIGINT,  skip_signal);
+	signal(SIGCHLD, skip_signal);
 	signal(SIGALRM, skip_signal);
 	signal(SIGABRT, skip_signal);
 
@@ -1272,11 +1397,13 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
 		status = run_perf_stat(argc, argv);
 	}
 
-	if (status != -1)
+	if (status != -1 && !interval)
 		print_stat(argc, argv);
 out_free_fd:
-	list_for_each_entry(pos, &evsel_list->entries, node)
+	list_for_each_entry(pos, &evsel_list->entries, node) {
 		perf_evsel__free_stat_priv(pos);
+		perf_evsel__free_prev_raw_counts(pos);
+	}
 	perf_evlist__delete_maps(evsel_list);
 out:
 	perf_evlist__delete(evsel_list);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 2/2] perf stat: add interval printing
  2013-01-22 13:18 ` [PATCH v6 2/2] perf stat: add interval printing Stephane Eranian
@ 2013-01-24  9:39   ` Ingo Molnar
  2013-01-25  2:52   ` Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 13+ messages in thread
From: Ingo Molnar @ 2013-01-24  9:39 UTC (permalink / raw)
  To: Stephane Eranian
  Cc: linux-kernel, peterz, mingo, ak, acme, jolsa, namhyung.kim


* Stephane Eranian <eranian@google.com> wrote:

> This patch adds a new printing mode for perf stat.
> It allows internval printing. That means perf stat

s/rnv/rv

> can now print event deltas at regular time interval.
> This is useful to detect phases in programs.
> 
> The -I option enables interval printing. It expects
> an interval duration in milliseconds. Minimum is
> 100ms. Once, activated perf stat prints events deltas
> since last printout. All modes are supported.
> 
> $ perf stat -I 1000 -e cycles noploop 10
> noploop for 10 seconds
>  #           time             counts events
>       1.000109853      2,388,560,546 cycles
>       2.000262846      2,393,332,358 cycles
>       3.000354131      2,393,176,537 cycles
>       4.000439503      2,393,203,790 cycles
>       5.000527075      2,393,167,675 cycles
>       6.000609052      2,393,203,670 cycles
>       7.000691082      2,393,175,678 cycles

Looks useful!

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 2/2] perf stat: add interval printing
  2013-01-22 13:18 ` [PATCH v6 2/2] perf stat: add interval printing Stephane Eranian
  2013-01-24  9:39   ` Ingo Molnar
@ 2013-01-25  2:52   ` Arnaldo Carvalho de Melo
  2013-01-25 15:21     ` Stephane Eranian
  1 sibling, 1 reply; 13+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-01-25  2:52 UTC (permalink / raw)
  To: Stephane Eranian; +Cc: linux-kernel, peterz, mingo, ak, jolsa, namhyung.kim

Em Tue, Jan 22, 2013 at 02:18:52PM +0100, Stephane Eranian escreveu:
> This patch adds a new printing mode for perf stat.
> It allows internval printing. That means perf stat
> can now print event deltas at regular time interval.
> This is useful to detect phases in programs.

This patch is not applying to my perf/core branch, does it depend on
some other outstanding patchset from you?

Tomorrow probably all I had in this area will be in Ingo's tree, but
can you please take a look at my perf/core branch at:

git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

?

Regards,

- Arnaldo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 2/2] perf stat: add interval printing
  2013-01-25  2:52   ` Arnaldo Carvalho de Melo
@ 2013-01-25 15:21     ` Stephane Eranian
  2013-01-28 17:59       ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 13+ messages in thread
From: Stephane Eranian @ 2013-01-25 15:21 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: LKML, Peter Zijlstra, mingo, ak, Jiri Olsa, Namhyung Kim

On Fri, Jan 25, 2013 at 3:52 AM, Arnaldo Carvalho de Melo
<acme@redhat.com> wrote:
> Em Tue, Jan 22, 2013 at 02:18:52PM +0100, Stephane Eranian escreveu:
>> This patch adds a new printing mode for perf stat.
>> It allows internval printing. That means perf stat
>> can now print event deltas at regular time interval.
>> This is useful to detect phases in programs.
>
> This patch is not applying to my perf/core branch, does it depend on
> some other outstanding patchset from you?
>
> Tomorrow probably all I had in this area will be in Ingo's tree, but
> can you please take a look at my perf/core branch at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
>
My patches are always relative to:
git://git.kernel.org/pub/scm/linux/kernel/git/tip.tip.git

Do you still need to rebase against your tree?

> ?
>
> Regards,
>
> - Arnaldo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 2/2] perf stat: add interval printing
  2013-01-25 15:21     ` Stephane Eranian
@ 2013-01-28 17:59       ` Arnaldo Carvalho de Melo
  2013-01-28 18:26         ` Stephane Eranian
  0 siblings, 1 reply; 13+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-01-28 17:59 UTC (permalink / raw)
  To: Stephane Eranian; +Cc: LKML, Peter Zijlstra, mingo, ak, Jiri Olsa, Namhyung Kim

Em Fri, Jan 25, 2013 at 04:21:11PM +0100, Stephane Eranian escreveu:
> On Fri, Jan 25, 2013 at 3:52 AM, Arnaldo Carvalho de Melo
> <acme@redhat.com> wrote:
> > Em Tue, Jan 22, 2013 at 02:18:52PM +0100, Stephane Eranian escreveu:
> >> This patch adds a new printing mode for perf stat.
> >> It allows internval printing. That means perf stat
> >> can now print event deltas at regular time interval.
> >> This is useful to detect phases in programs.
> >
> > This patch is not applying to my perf/core branch, does it depend on
> > some other outstanding patchset from you?
> >
> > Tomorrow probably all I had in this area will be in Ingo's tree, but
> > can you please take a look at my perf/core branch at:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
> >
> My patches are always relative to:
> git://git.kernel.org/pub/scm/linux/kernel/git/tip.tip.git
> 
> Do you still need to rebase against your tree?

Well, userspace code normally is developed on my tree and eventually
goes to the one you mentioned. If you make sure that now, that both are
synched after some weeks, then probably it'll work with my tree.

- Arnaldo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 2/2] perf stat: add interval printing
  2013-01-28 17:59       ` Arnaldo Carvalho de Melo
@ 2013-01-28 18:26         ` Stephane Eranian
  2013-01-28 19:21           ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 13+ messages in thread
From: Stephane Eranian @ 2013-01-28 18:26 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: LKML, Peter Zijlstra, mingo, ak, Jiri Olsa, Namhyung Kim

On Mon, Jan 28, 2013 at 6:59 PM, Arnaldo Carvalho de Melo
<acme@redhat.com> wrote:
> Em Fri, Jan 25, 2013 at 04:21:11PM +0100, Stephane Eranian escreveu:
>> On Fri, Jan 25, 2013 at 3:52 AM, Arnaldo Carvalho de Melo
>> <acme@redhat.com> wrote:
>> > Em Tue, Jan 22, 2013 at 02:18:52PM +0100, Stephane Eranian escreveu:
>> >> This patch adds a new printing mode for perf stat.
>> >> It allows internval printing. That means perf stat
>> >> can now print event deltas at regular time interval.
>> >> This is useful to detect phases in programs.
>> >
>> > This patch is not applying to my perf/core branch, does it depend on
>> > some other outstanding patchset from you?
>> >
>> > Tomorrow probably all I had in this area will be in Ingo's tree, but
>> > can you please take a look at my perf/core branch at:
>> >
>> > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
>> >
>> My patches are always relative to:
>> git://git.kernel.org/pub/scm/linux/kernel/git/tip.tip.git
>>
>> Do you still need to rebase against your tree?
>
> Well, userspace code normally is developed on my tree and eventually
> goes to the one you mentioned. If you make sure that now, that both are
> synched after some weeks, then probably it'll work with my tree.
>
How's the kernel proper side of your tree sync'd with tip.git? I cannot have
the kernel patches for one tree and the perf patches for another. That's a
lot of overhead especially when it comes to testing.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 2/2] perf stat: add interval printing
  2013-01-28 18:26         ` Stephane Eranian
@ 2013-01-28 19:21           ` Arnaldo Carvalho de Melo
  2013-01-28 22:45             ` Stephane Eranian
  0 siblings, 1 reply; 13+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-01-28 19:21 UTC (permalink / raw)
  To: Stephane Eranian; +Cc: LKML, Peter Zijlstra, mingo, ak, Jiri Olsa, Namhyung Kim

Em Mon, Jan 28, 2013 at 07:26:17PM +0100, Stephane Eranian escreveu:
> On Mon, Jan 28, 2013 at 6:59 PM, Arnaldo Carvalho de Melo
> <acme@redhat.com> wrote:
> > Em Fri, Jan 25, 2013 at 04:21:11PM +0100, Stephane Eranian escreveu:
> >> On Fri, Jan 25, 2013 at 3:52 AM, Arnaldo Carvalho de Melo
> >> <acme@redhat.com> wrote:
> >> > Em Tue, Jan 22, 2013 at 02:18:52PM +0100, Stephane Eranian escreveu:
> >> >> This patch adds a new printing mode for perf stat.
> >> >> It allows internval printing. That means perf stat
> >> >> can now print event deltas at regular time interval.
> >> >> This is useful to detect phases in programs.
> >> >
> >> > This patch is not applying to my perf/core branch, does it depend on
> >> > some other outstanding patchset from you?
> >> >
> >> > Tomorrow probably all I had in this area will be in Ingo's tree, but
> >> > can you please take a look at my perf/core branch at:
> >> >
> >> > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
> >> >
> >> My patches are always relative to:
> >> git://git.kernel.org/pub/scm/linux/kernel/git/tip.tip.git
> >>
> >> Do you still need to rebase against your tree?
> >
> > Well, userspace code normally is developed on my tree and eventually
> > goes to the one you mentioned. If you make sure that now, that both are
> > synched after some weeks, then probably it'll work with my tree.
> >
> How's the kernel proper side of your tree sync'd with tip.git? I cannot have
> the kernel patches for one tree and the perf patches for another. That's a
> lot of overhead especially when it comes to testing.

Normally regularly, right now it seems all is synched.

- Arnaldo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 2/2] perf stat: add interval printing
  2013-01-28 19:21           ` Arnaldo Carvalho de Melo
@ 2013-01-28 22:45             ` Stephane Eranian
  2013-01-29  1:41               ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 13+ messages in thread
From: Stephane Eranian @ 2013-01-28 22:45 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: LKML, Peter Zijlstra, mingo, ak, Jiri Olsa, Namhyung Kim

On Mon, Jan 28, 2013 at 8:21 PM, Arnaldo Carvalho de Melo
<acme@redhat.com> wrote:
> Em Mon, Jan 28, 2013 at 07:26:17PM +0100, Stephane Eranian escreveu:
>> On Mon, Jan 28, 2013 at 6:59 PM, Arnaldo Carvalho de Melo
>> <acme@redhat.com> wrote:
>> > Em Fri, Jan 25, 2013 at 04:21:11PM +0100, Stephane Eranian escreveu:
>> >> On Fri, Jan 25, 2013 at 3:52 AM, Arnaldo Carvalho de Melo
>> >> <acme@redhat.com> wrote:
>> >> > Em Tue, Jan 22, 2013 at 02:18:52PM +0100, Stephane Eranian escreveu:
>> >> >> This patch adds a new printing mode for perf stat.
>> >> >> It allows internval printing. That means perf stat
>> >> >> can now print event deltas at regular time interval.
>> >> >> This is useful to detect phases in programs.
>> >> >
>> >> > This patch is not applying to my perf/core branch, does it depend on
>> >> > some other outstanding patchset from you?
>> >> >
>> >> > Tomorrow probably all I had in this area will be in Ingo's tree, but
>> >> > can you please take a look at my perf/core branch at:
>> >> >
>> >> > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
>> >> >
>> >> My patches are always relative to:
>> >> git://git.kernel.org/pub/scm/linux/kernel/git/tip.tip.git
>> >>
>> >> Do you still need to rebase against your tree?
>> >
>> > Well, userspace code normally is developed on my tree and eventually
>> > goes to the one you mentioned. If you make sure that now, that both are
>> > synched after some weeks, then probably it'll work with my tree.
>> >
>> How's the kernel proper side of your tree sync'd with tip.git? I cannot have
>> the kernel patches for one tree and the perf patches for another. That's a
>> lot of overhead especially when it comes to testing.
>
> Normally regularly, right now it seems all is synched.
>
Ok, will resubmit the series against your tree then.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 2/2] perf stat: add interval printing
  2013-01-28 22:45             ` Stephane Eranian
@ 2013-01-29  1:41               ` Arnaldo Carvalho de Melo
  2013-01-29 11:48                 ` Stephane Eranian
  0 siblings, 1 reply; 13+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-01-29  1:41 UTC (permalink / raw)
  To: Stephane Eranian; +Cc: LKML, Peter Zijlstra, mingo, ak, Jiri Olsa, Namhyung Kim

Em Mon, Jan 28, 2013 at 11:45:56PM +0100, Stephane Eranian escreveu:
> On Mon, Jan 28, 2013 at 8:21 PM, Arnaldo Carvalho de Melo
> <acme@redhat.com> wrote:
> > Em Mon, Jan 28, 2013 at 07:26:17PM +0100, Stephane Eranian escreveu:
> >> On Mon, Jan 28, 2013 at 6:59 PM, Arnaldo Carvalho de Melo
> >> <acme@redhat.com> wrote:
> >> > Em Fri, Jan 25, 2013 at 04:21:11PM +0100, Stephane Eranian escreveu:
> >> >> My patches are always relative to:
> >> >> git://git.kernel.org/pub/scm/linux/kernel/git/tip.tip.git

> >> >> Do you still need to rebase against your tree?

> >> > Well, userspace code normally is developed on my tree and eventually
> >> > goes to the one you mentioned. If you make sure that now, that both are
> >> > synched after some weeks, then probably it'll work with my tree.

> >> How's the kernel proper side of your tree sync'd with tip.git? I cannot have
> >> the kernel patches for one tree and the perf patches for another. That's a
> >> lot of overhead especially when it comes to testing.

> > Normally regularly, right now it seems all is synched.

> Ok, will resubmit the series against your tree then.

Also everytime Ingo merges I rebase my tree against tip/perf/core, if
you ever need something that is in some other branch that everybody
agrees will go upstream, like tip/perf/urgent or Linus's, just let me
know and I'll coordinate with Ingo and merge it into acme/perf/core.

Talking about that I need to merge tip/perf/urgent, Jiri needs that
precise attribute revert...

- Arnaldo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 2/2] perf stat: add interval printing
  2013-01-29  1:41               ` Arnaldo Carvalho de Melo
@ 2013-01-29 11:48                 ` Stephane Eranian
  2013-01-29 20:58                   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 13+ messages in thread
From: Stephane Eranian @ 2013-01-29 11:48 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: LKML, Peter Zijlstra, mingo, ak, Jiri Olsa, Namhyung Kim

Arnaldo,

V7 posted. It's a rebase done against your perf/core, was no big deal.
Let me know if it works for you now.


On Tue, Jan 29, 2013 at 2:41 AM, Arnaldo Carvalho de Melo
<acme@redhat.com> wrote:
> Em Mon, Jan 28, 2013 at 11:45:56PM +0100, Stephane Eranian escreveu:
>> On Mon, Jan 28, 2013 at 8:21 PM, Arnaldo Carvalho de Melo
>> <acme@redhat.com> wrote:
>> > Em Mon, Jan 28, 2013 at 07:26:17PM +0100, Stephane Eranian escreveu:
>> >> On Mon, Jan 28, 2013 at 6:59 PM, Arnaldo Carvalho de Melo
>> >> <acme@redhat.com> wrote:
>> >> > Em Fri, Jan 25, 2013 at 04:21:11PM +0100, Stephane Eranian escreveu:
>> >> >> My patches are always relative to:
>> >> >> git://git.kernel.org/pub/scm/linux/kernel/git/tip.tip.git
>
>> >> >> Do you still need to rebase against your tree?
>
>> >> > Well, userspace code normally is developed on my tree and eventually
>> >> > goes to the one you mentioned. If you make sure that now, that both are
>> >> > synched after some weeks, then probably it'll work with my tree.
>
>> >> How's the kernel proper side of your tree sync'd with tip.git? I cannot have
>> >> the kernel patches for one tree and the perf patches for another. That's a
>> >> lot of overhead especially when it comes to testing.
>
>> > Normally regularly, right now it seems all is synched.
>
>> Ok, will resubmit the series against your tree then.
>
> Also everytime Ingo merges I rebase my tree against tip/perf/core, if
> you ever need something that is in some other branch that everybody
> agrees will go upstream, like tip/perf/urgent or Linus's, just let me
> know and I'll coordinate with Ingo and merge it into acme/perf/core.
>
> Talking about that I need to merge tip/perf/urgent, Jiri needs that
> precise attribute revert...
>
> - Arnaldo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v6 2/2] perf stat: add interval printing
  2013-01-29 11:48                 ` Stephane Eranian
@ 2013-01-29 20:58                   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 13+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-01-29 20:58 UTC (permalink / raw)
  To: Stephane Eranian; +Cc: LKML, Peter Zijlstra, mingo, ak, Jiri Olsa, Namhyung Kim

Em Tue, Jan 29, 2013 at 12:48:51PM +0100, Stephane Eranian escreveu:
> Arnaldo,
> 
> V7 posted. It's a rebase done against your perf/core, was no big deal.
> Let me know if it works for you now.

Thanks, it is now merged in my perf/core branch,

- Arnaldo
 
> 
> On Tue, Jan 29, 2013 at 2:41 AM, Arnaldo Carvalho de Melo
> <acme@redhat.com> wrote:
> > Em Mon, Jan 28, 2013 at 11:45:56PM +0100, Stephane Eranian escreveu:
> >> On Mon, Jan 28, 2013 at 8:21 PM, Arnaldo Carvalho de Melo
> >> <acme@redhat.com> wrote:
> >> > Em Mon, Jan 28, 2013 at 07:26:17PM +0100, Stephane Eranian escreveu:
> >> >> On Mon, Jan 28, 2013 at 6:59 PM, Arnaldo Carvalho de Melo
> >> >> <acme@redhat.com> wrote:
> >> >> > Em Fri, Jan 25, 2013 at 04:21:11PM +0100, Stephane Eranian escreveu:
> >> >> >> My patches are always relative to:
> >> >> >> git://git.kernel.org/pub/scm/linux/kernel/git/tip.tip.git
> >
> >> >> >> Do you still need to rebase against your tree?
> >
> >> >> > Well, userspace code normally is developed on my tree and eventually
> >> >> > goes to the one you mentioned. If you make sure that now, that both are
> >> >> > synched after some weeks, then probably it'll work with my tree.
> >
> >> >> How's the kernel proper side of your tree sync'd with tip.git? I cannot have
> >> >> the kernel patches for one tree and the perf patches for another. That's a
> >> >> lot of overhead especially when it comes to testing.
> >
> >> > Normally regularly, right now it seems all is synched.
> >
> >> Ok, will resubmit the series against your tree then.
> >
> > Also everytime Ingo merges I rebase my tree against tip/perf/core, if
> > you ever need something that is in some other branch that everybody
> > agrees will go upstream, like tip/perf/urgent or Linus's, just let me
> > know and I'll coordinate with Ingo and merge it into acme/perf/core.
> >
> > Talking about that I need to merge tip/perf/urgent, Jiri needs that
> > precise attribute revert...
> >
> > - Arnaldo

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-01-29 20:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-22 13:18 [PATCH v6 0/2] perf stat: add interval counter printing Stephane Eranian
2013-01-22 13:18 ` [PATCH v6 1/2] perf tools: add evsel prev_raw_count field Stephane Eranian
2013-01-22 13:18 ` [PATCH v6 2/2] perf stat: add interval printing Stephane Eranian
2013-01-24  9:39   ` Ingo Molnar
2013-01-25  2:52   ` Arnaldo Carvalho de Melo
2013-01-25 15:21     ` Stephane Eranian
2013-01-28 17:59       ` Arnaldo Carvalho de Melo
2013-01-28 18:26         ` Stephane Eranian
2013-01-28 19:21           ` Arnaldo Carvalho de Melo
2013-01-28 22:45             ` Stephane Eranian
2013-01-29  1:41               ` Arnaldo Carvalho de Melo
2013-01-29 11:48                 ` Stephane Eranian
2013-01-29 20:58                   ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).