linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the oprofile tree with the tip tree
@ 2010-10-12  2:18 Stephen Rothwell
  2010-10-12  6:03 ` Matt Fleming
  2010-10-15 12:43 ` Robert Richter
  0 siblings, 2 replies; 13+ messages in thread
From: Stephen Rothwell @ 2010-10-12  2:18 UTC (permalink / raw)
  To: Robert Richter
  Cc: linux-next, linux-kernel, Matt Helsley, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, Peter Zijlstra, Matt Fleming

Hi Robert,

Today's linux-next merge of the oprofile tree got a conflict in
arch/arm/oprofile/common.c between commit
38a81da2205f94e8a2a834b51a6b99c91fc7c2e8 ("perf events: Clean up pid
passing") from the tip tree and commit
3d90a00763b51e1db344a7430c966be723b67a29 ("oprofile: Abstract the
perf-events backend") from the oprofile tree.

The latter moved the code modified by the former, so I used the version
of this file from the oprofile tree.  I also applied the effect of the
tip tree patch to the new file drivers/oprofile/oprofile_perf.c:

diff --git a/drivers/oprofile/oprofile_perf.c b/drivers/oprofile/oprofile_perf.c
index b17235a..afbc43b 100644
--- a/drivers/oprofile/oprofile_perf.c
+++ b/drivers/oprofile/oprofile_perf.c
@@ -77,7 +77,7 @@ static int op_create_counter(int cpu, int event)
 		return 0;
 
 	pevent = perf_event_create_kernel_counter(&counter_config[event].attr,
-						  cpu, -1,
+						  cpu, NULL1,
 						  op_overflow_handler);
 
 	if (IS_ERR(pevent))
-- 
1.7.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply related	[flat|nested] 13+ messages in thread
* linux-next: manual merge of the oprofile tree with the tip tree
@ 2012-03-21  5:31 Stephen Rothwell
  2012-03-21 12:33 ` Robert Richter
  0 siblings, 1 reply; 13+ messages in thread
From: Stephen Rothwell @ 2012-03-21  5:31 UTC (permalink / raw)
  To: Robert Richter
  Cc: linux-next, linux-kernel, Lin Ming, Jiri Olsa, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	Arnaldo Carvalho de Melo

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]

Hi Robert,

Today's linux-next merge of the oprofile tree got a conflict in
tools/perf/util/parse-events.c between commit 89812fc81f8d ("perf tools:
Add parser generator for events parsing") from the tip tree and commit
1e48600d2388 ("perf tool: Parse general/raw events from sysfs") from the
oprofile tree.

I have no idea how to fix this up, so I effectively dropped this patch
from the oprofile tree.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* linux-next: manual merge of the oprofile tree with the tip tree
@ 2012-03-13  6:37 Stephen Rothwell
  2012-03-13  8:31 ` Ingo Molnar
  0 siblings, 1 reply; 13+ messages in thread
From: Stephen Rothwell @ 2012-03-13  6:37 UTC (permalink / raw)
  To: Robert Richter
  Cc: linux-next, linux-kernel, Stephane Eranian, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, Peter Zijlstra

[-- Attachment #1: Type: text/plain, Size: 2421 bytes --]

Hi Robert,

Today's linux-next merge of the oprofile tree got a conflict in
tools/perf/util/header.c tools/perf/util/header.h between commit
330aa675b4f9 ("perf record: Add HEADER_BRANCH_STACK tag") from the tip
tree and commit c415f577eb32 ("perf tools: Add pmu mappings to header
information") from the oprofile tree.

Just context changes.  I fixed it up (see below) and can carry the fix as
necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc tools/perf/util/header.c
index 0d9b6da,626eb90..0000000
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@@ -1321,12 -1372,37 +1388,43 @@@ static void print_cpuid(struct perf_hea
  	free(str);
  }
  
 +static void print_branch_stack(struct perf_header *ph __used, int fd __used,
 +			       FILE *fp)
 +{
 +	fprintf(fp, "# contains samples with branch stack\n");
 +}
 +
+ static void print_pmu_mappings(struct perf_header *ph, int fd, FILE *fp)
+ {
+ 	const char *delimiter = "# pmu mappings: ";
+ 	char *name;
+ 	int ret;
+ 	u32 pmu_num;
+ 	u32 type;
+ 
+ 	ret = read(fd, &pmu_num, sizeof(pmu_num));
+ 	if (ret != sizeof(pmu_num))
+ 		goto error;
+ 
+ 	if (!pmu_num)
+ 		goto error;
+ 
+ 	while (pmu_num--) {
+ 		if (read(fd, &type, sizeof(type)) != sizeof(type))
+ 			goto error;
+ 		name = do_read_string(fd, ph);
+ 		fprintf(fp, "%s%s = %" PRIu32, delimiter, name, type);
+ 		free(name);
+ 		delimiter = ", ";
+ 	}
+ 
+ 	fprintf(fp, "\n");
+ 
+ 	return;
+ error:
+ 	fprintf(fp, "# pmu mappings: not available\n");
+ }
+ 
  static int __event_process_build_id(struct build_id_event *bev,
  				    char *filename,
  				    struct perf_session *session)
@@@ -1531,7 -1607,7 +1629,8 @@@ static const struct feature_ops feat_op
  	FEAT_OPA(HEADER_CMDLINE,	cmdline),
  	FEAT_OPF(HEADER_CPU_TOPOLOGY,	cpu_topology),
  	FEAT_OPF(HEADER_NUMA_TOPOLOGY,	numa_topology),
 +	FEAT_OPA(HEADER_BRANCH_STACK,	branch_stack),
+ 	FEAT_OPA(HEADER_PMU_MAPPINGS,	pmu_mappings),
  };
  
  struct header_print_data {
diff --cc tools/perf/util/header.h
index 21a6be0,9b4d407..0000000
--- a/tools/perf/util/header.h
+++ b/tools/perf/util/header.h
@@@ -27,7 -27,8 +27,8 @@@ enum 
  	HEADER_EVENT_DESC,
  	HEADER_CPU_TOPOLOGY,
  	HEADER_NUMA_TOPOLOGY,
 +	HEADER_BRANCH_STACK,
+ 	HEADER_PMU_MAPPINGS,
 -
  	HEADER_LAST_FEATURE,
  	HEADER_FEAT_BITS	= 256,
  };

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* linux-next: manual merge of the oprofile tree with the tip tree
@ 2010-10-12  2:13 Stephen Rothwell
  0 siblings, 0 replies; 13+ messages in thread
From: Stephen Rothwell @ 2010-10-12  2:13 UTC (permalink / raw)
  To: Robert Richter
  Cc: linux-next, linux-kernel, Matt Fleming, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, Peter Zijlstra

Hi Robert,

Today's linux-next merge of the oprofile tree got a conflict in
kernel/perf_event.c between commit
33696fc0d141bbbcb12f75b69608ea83282e3117 ("perf: Per PMU disable") from
the tip tree and commit 84c7991059c9c4530cc911137c5bf508a41ed129 ("perf:
New helper function for pmu name") from the oprofile tree.

Just context changes.  I fixed it up (see below) and can carry the fix as
necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc kernel/perf_event.c
index 64507ea,fc51268..0000000
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@@ -61,38 -67,41 +61,43 @@@ int sysctl_perf_event_sample_rate __rea
  
  static atomic64_t perf_event_id;
  
 -/*
 - * Lock for (sysadmin-configurable) event reservations:
 - */
 -static DEFINE_SPINLOCK(perf_resource_lock);
 +void __weak perf_event_print_debug(void)	{ }
  
 -/*
 - * Architecture provided APIs - weak aliases:
 - */
 -extern __weak const struct pmu *hw_perf_event_init(struct perf_event *event)
 +void perf_pmu_disable(struct pmu *pmu)
  {
 -	return NULL;
 +	int *count = this_cpu_ptr(pmu->pmu_disable_count);
 +	if (!(*count)++)
 +		pmu->pmu_disable(pmu);
  }
  
 -void __weak hw_perf_disable(void)		{ barrier(); }
 -void __weak hw_perf_enable(void)		{ barrier(); }
 -
 -void __weak perf_event_print_debug(void)	{ }
 -
+ extern __weak const char *perf_pmu_name(void)
+ {
+ 	return "pmu";
+ }
+ 
 -static DEFINE_PER_CPU(int, perf_disable_count);
 -
 -void perf_disable(void)
 +void perf_pmu_enable(struct pmu *pmu)
  {
 -	if (!__get_cpu_var(perf_disable_count)++)
 -		hw_perf_disable();
 +	int *count = this_cpu_ptr(pmu->pmu_disable_count);
 +	if (!--(*count))
 +		pmu->pmu_enable(pmu);
  }
  
 -void perf_enable(void)
 +static DEFINE_PER_CPU(struct list_head, rotation_list);
 +
 +/*
 + * perf_pmu_rotate_start() and perf_rotate_context() are fully serialized
 + * because they're strictly cpu affine and rotate_start is called with IRQs
 + * disabled, while rotate_context is called from IRQ context.
 + */
 +static void perf_pmu_rotate_start(struct pmu *pmu)
  {
 -	if (!--__get_cpu_var(perf_disable_count))
 -		hw_perf_enable();
 +	struct perf_cpu_context *cpuctx = this_cpu_ptr(pmu->pmu_cpu_context);
 +	struct list_head *head = &__get_cpu_var(rotation_list);
 +
 +	WARN_ON(!irqs_disabled());
 +
 +	if (list_empty(&cpuctx->rotation_list))
 +		list_add(&cpuctx->rotation_list, head);
  }
  
  static void get_ctx(struct perf_event_context *ctx)

^ permalink raw reply	[flat|nested] 13+ messages in thread
* linux-next: manual merge of the oprofile tree with the tip tree
@ 2010-10-01  3:53 Stephen Rothwell
  2010-10-01 13:21 ` Robert Richter
  0 siblings, 1 reply; 13+ messages in thread
From: Stephen Rothwell @ 2010-10-01  3:53 UTC (permalink / raw)
  To: Robert Richter
  Cc: linux-next, linux-kernel, Will Deacon, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, Peter Zijlstra

Hi Robert,

Today's linux-next merge of the oprofile tree got a conflict in
arch/arm/oprofile/common.c between commit
98d943b02f6f1b57787ff1aa6f34d019a407e3ee ("oprofile, ARM: Release
resources on failure") from the tip tree and commit
c7fd239a647ead1c336a051012d6bb96465ea8c6 ("ARM: oprofile: fix and
simplify init/exit functions") from the oprofile tree.

I fixed it up (I think - see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc arch/arm/oprofile/common.c
index d1fb5b2,d660cb8..0000000
--- a/arch/arm/oprofile/common.c
+++ b/arch/arm/oprofile/common.c
@@@ -395,6 -393,13 +394,14 @@@ int __init oprofile_arch_init(struct op
  	else
  		pr_info("oprofile: using %s\n", ops->cpu_type);
  
+ out:
+ 	if (ret) {
+ 		for_each_possible_cpu(cpu)
+ 			kfree(perf_events[cpu]);
+ 		kfree(counter_config);
++		counter_config = NULL;
+ 	}
+ 
  	return ret;
  }
  

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

end of thread, other threads:[~2012-03-21 13:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-12  2:18 linux-next: manual merge of the oprofile tree with the tip tree Stephen Rothwell
2010-10-12  6:03 ` Matt Fleming
2010-10-12 12:23   ` Stephen Rothwell
2010-10-12 12:51     ` Matt Fleming
2010-10-15 12:43 ` Robert Richter
  -- strict thread matches above, loose matches on Subject: below --
2012-03-21  5:31 Stephen Rothwell
2012-03-21 12:33 ` Robert Richter
2012-03-21 13:52   ` Stephen Rothwell
2012-03-13  6:37 Stephen Rothwell
2012-03-13  8:31 ` Ingo Molnar
2010-10-12  2:13 Stephen Rothwell
2010-10-01  3:53 Stephen Rothwell
2010-10-01 13:21 ` Robert Richter

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).