Skip to content

Conversation

@kernel-patches-daemon-bpf-rc
Copy link

Pull request for series with
subject: Pass external callchain entry to get_perf_callchain
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1010878

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 39e9d5f
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1010878
version: 1

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/netdevbpf/list/?series=1010878
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: perf: Use extern perf_callchain_entry for get_perf_callchain
Using index info to reconstruct a base tree...
M	include/linux/perf_event.h
M	kernel/bpf/stackmap.c
M	kernel/events/callchain.c
M	kernel/events/core.c
Falling back to patching base and 3-way merge...
Auto-merging kernel/events/core.c
CONFLICT (content): Merge conflict in kernel/events/core.c
Auto-merging kernel/events/callchain.c
CONFLICT (content): Merge conflict in kernel/events/callchain.c
Auto-merging kernel/bpf/stackmap.c
CONFLICT (content): Merge conflict in kernel/bpf/stackmap.c
Auto-merging include/linux/perf_event.h
CONFLICT (content): Merge conflict in include/linux/perf_event.h
Patch failed at 0001 perf: Use extern perf_callchain_entry for get_perf_callchain'
  stderr: 'error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"'

conflict:

diff --cc include/linux/perf_event.h
index fd1d91017b99,ca69ad2723c2..000000000000
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@@ -1719,8 -1719,9 +1719,14 @@@ DECLARE_PER_CPU(struct perf_callchain_e
  extern void perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs);
  extern void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs);
  extern struct perf_callchain_entry *
++<<<<<<< HEAD
 +get_perf_callchain(struct pt_regs *regs, bool kernel, bool user,
 +		   u32 max_stack, bool crosstask, bool add_mark);
++=======
+ get_perf_callchain(struct pt_regs *regs, struct perf_callchain_entry *external_entry,
+ 		   u32 init_nr, bool kernel, bool user, u32 max_stack, bool crosstask,
+ 		   bool add_mark);
++>>>>>>> perf: Use extern perf_callchain_entry for get_perf_callchain
  extern int get_callchain_buffers(int max_stack);
  extern void put_callchain_buffers(void);
  extern struct perf_callchain_entry *get_callchain_entry(int *rctx);
diff --cc kernel/bpf/stackmap.c
index 4d53cdd1374c,e6e40f228263..000000000000
--- a/kernel/bpf/stackmap.c
+++ b/kernel/bpf/stackmap.c
@@@ -314,7 -314,7 +314,11 @@@ BPF_CALL_3(bpf_get_stackid, struct pt_r
  	if (max_depth > sysctl_perf_event_max_stack)
  		max_depth = sysctl_perf_event_max_stack;
  
++<<<<<<< HEAD
 +	trace = get_perf_callchain(regs, kernel, user, max_depth,
++=======
+ 	trace = get_perf_callchain(regs, NULL, 0, kernel, user, max_depth,
++>>>>>>> perf: Use extern perf_callchain_entry for get_perf_callchain
  				   false, false);
  
  	if (unlikely(!trace))
@@@ -451,7 -451,7 +455,11 @@@ static long __bpf_get_stack(struct pt_r
  	else if (kernel && task)
  		trace = get_callchain_entry_for_task(task, max_depth);
  	else
++<<<<<<< HEAD
 +		trace = get_perf_callchain(regs, kernel, user, max_depth,
++=======
+ 		trace = get_perf_callchain(regs, NULL, 0, kernel, user, max_depth,
++>>>>>>> perf: Use extern perf_callchain_entry for get_perf_callchain
  					   crosstask, false);
  
  	if (unlikely(!trace) || trace->nr < skip) {
diff --cc kernel/events/callchain.c
index 808c0d7a31fa,fe5d2d58deb9..000000000000
--- a/kernel/events/callchain.c
+++ b/kernel/events/callchain.c
@@@ -217,26 -217,27 +217,42 @@@ static void fixup_uretprobe_trampoline_
  }
  
  struct perf_callchain_entry *
++<<<<<<< HEAD
 +get_perf_callchain(struct pt_regs *regs, bool kernel, bool user,
 +		   u32 max_stack, bool crosstask, bool add_mark)
++=======
+ get_perf_callchain(struct pt_regs *regs, struct perf_callchain_entry *external_entry,
+ 		   u32 init_nr, bool kernel, bool user, u32 max_stack, bool crosstask,
+ 		   bool add_mark)
++>>>>>>> perf: Use extern perf_callchain_entry for get_perf_callchain
  {
  	struct perf_callchain_entry *entry;
  	struct perf_callchain_entry_ctx ctx;
  	int rctx, start_entry_idx;
  
++<<<<<<< HEAD
 +	/* crosstask is not supported for user stacks */
 +	if (crosstask && user && !kernel)
 +		return NULL;
 +
 +	entry = get_callchain_entry(&rctx);
 +	if (!entry)
 +		return NULL;
++=======
+ 	if (external_entry) {
+ 		entry = external_entry;
+ 	} else {
+ 		entry = get_callchain_entry(&rctx);
+ 		if (!entry)
+ 			return NULL;
+ 	}
++>>>>>>> perf: Use extern perf_callchain_entry for get_perf_callchain
  
 -	ctx.entry     = entry;
 -	ctx.max_stack = max_stack;
 -	ctx.nr	      = entry->nr = init_nr;
 -	ctx.contexts       = 0;
 -	ctx.contexts_maxed = false;
 +	ctx.entry		= entry;
 +	ctx.max_stack		= max_stack;
 +	ctx.nr			= entry->nr = 0;
 +	ctx.contexts		= 0;
 +	ctx.contexts_maxed	= false;
  
  	if (kernel && !user_mode(regs)) {
  		if (add_mark)
diff --cc kernel/events/core.c
index 7541f6f85fcb,08ce44db18f0..000000000000
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@@ -8217,7 -8204,7 +8217,11 @@@ perf_callchain(struct perf_event *event
  	if (!kernel && !user)
  		return &__empty_callchain;
  
++<<<<<<< HEAD
 +	callchain = get_perf_callchain(regs, kernel, user,
++=======
+ 	callchain = get_perf_callchain(regs, NULL, 0, kernel, user,
++>>>>>>> perf: Use extern perf_callchain_entry for get_perf_callchain
  				       max_stack, crosstask, true);
  	return callchain ?: &__empty_callchain;
  }

@kernel-patches-daemon-bpf-rc
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=1010878 expired. Closing PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant