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

Commit 2d5bfe2c authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: move printk out of spin lock low_water_lock"

parents d381c52d cf68485f
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -754,6 +754,7 @@ static void check_stack_usage(void)
	static DEFINE_SPINLOCK(low_water_lock);
	static int lowest_to_date = THREAD_SIZE;
	unsigned long free;
	int islower = false;

	free = stack_not_used(current);

@@ -762,11 +763,15 @@ static void check_stack_usage(void)

	spin_lock(&low_water_lock);
	if (free < lowest_to_date) {
		pr_info("%s (%d) used greatest stack depth: %lu bytes left\n",
			current->comm, task_pid_nr(current), free);
		lowest_to_date = free;
		islower = true;
	}
	spin_unlock(&low_water_lock);

	if (islower) {
		pr_info("%s (%d) used greatest stack depth: %lu bytes left\n",
				current->comm, task_pid_nr(current), free);
	}
}
#else
static inline void check_stack_usage(void) {}