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

Commit d325d37e authored by Todd Kjos's avatar Todd Kjos
Browse files

FROMLIST: binder: separate out binder_alloc functions

(from https://patchwork.kernel.org/patch/9817753/

)

Continuation of splitting the binder allocator from the binder
driver. Separate binder_alloc functions from normal binder
functions. Protect the allocator with a separate mutex.

Change-Id: I119b05b4d0573fc965f863f34fa2ebfae40426f7
Signed-off-by: default avatarTodd Kjos <tkjos@google.com>
parent 349757ce
Loading
Loading
Loading
Loading
+405 −245

File changed.

Preview size limit exceeded, changes collapsed.

+5 −4
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
struct binder_buffer;
struct binder_node;
struct binder_proc;
struct binder_alloc;
struct binder_ref;
struct binder_thread;
struct binder_transaction;
@@ -268,9 +269,9 @@ DEFINE_EVENT(binder_buffer_class, binder_transaction_failed_buffer_release,
	TP_ARGS(buffer));

TRACE_EVENT(binder_update_page_range,
	TP_PROTO(struct binder_proc *proc, bool allocate,
	TP_PROTO(struct binder_alloc *alloc, bool allocate,
		 void *start, void *end),
	TP_ARGS(proc, allocate, start, end),
	TP_ARGS(alloc, allocate, start, end),
	TP_STRUCT__entry(
		__field(int, proc)
		__field(bool, allocate)
@@ -278,9 +279,9 @@ TRACE_EVENT(binder_update_page_range,
		__field(size_t, size)
	),
	TP_fast_assign(
		__entry->proc = proc->pid;
		__entry->proc = alloc->pid;
		__entry->allocate = allocate;
		__entry->offset = start - proc->alloc.buffer;
		__entry->offset = start - alloc->buffer;
		__entry->size = end - start;
	),
	TP_printk("proc=%d allocate=%d offset=%zu size=%zu",