[U-Boot] how to limit sandbox to a single thread/core?

Simon Glass sjg at chromium.org
Tue Dec 17 23:54:54 CET 2013


Hi,

On 16 December 2013 21:59, Abraham V. <abraham.varricatt at vvdntech.com> wrote:
> On Tue, Dec 17, 2013 at 2:00 AM, Simon Glass <sjg at chromium.org> wrote:
>> Hi,
>>
>> On 13 December 2013 01:47, Abraham V. <abraham.varricatt at vvdntech.com> wrote:
>>> Hello,
>>>
>>> I just discovered that uboot has a "sandbox" build - output binary is
>>> a standard linux application. This prompted me to try stepping through
>>> the code with gdb and I'm running into an annoyance.
>>>
>>> The sandbox binary is splitting into 4 threads (I'm guessing one for
>>> each of my cores, am running this on an intel i3). This results in gdb
>>> jumping between the different threads every once in a while.
>>>
>>> Is there anyway to setup the sandbox to run as a single thread?
>>
>> This is news to me - I have not hit this problem yet. Can you see what
>> the threads are?
>>
>> Regards,
>> Simon
>
> I'm ... embarrassed to report that this is a false alarm. Took me a
> couple of days and I was about to send a reply today morning when I
> saw your response. What happened is that I used the eclipse-cdt
> debugger to try tracing the sandbox application. An interesting
> 'feature' of this debugger is that it shows which core a process is
> running on. Here are a few (links) screenshots,
>
> http://imageshack.us/a/img14/2202/ze37.png
> http://imageshack.us/a/img855/1153/uwul.png
> http://imageshack.us/a/img585/8499/ibz3.png
>
> It wasn't until yesterday when I realized that, while the application
> was jumping between cores, the thread number was exactly the same - it
> wasn't a multi-threaded application, but a single threaded one just
> bouncing around! This puzzled me so much that I even started a SO
> question over the matter,
>
> http://stackoverflow.com/questions/20608032/while-debugging-will-a-single-threaded-application-jump-between-cores
>
> Turns out that the scheduler knocked me off-balance. Can't believe I'm
> saying this, but I miss the days when everything ran on a single
> thread/processor core.

OK that's good, thanks for the detailed explanation, I'm sure others
will hit this.

Regards,
Simon

>
> A little embarrassed,
> Abraham V.


More information about the U-Boot mailing list