Displaying 9 results from an estimated 9 matches for "makecontext".
2010 Apr 07
2
[LLVMdev] Proposal: stack/context switching within a thread
Right now the functionality is available, sometimes, from the C
standard library. But embedded environments (often running a limited
standard library) and server environments would benefit heavily from a
standard way to specify context switches within a single thread in the
style of makecontext/swapcontext/setcontext, and built-in support for
these operations would also open the way for optimizers to begin
handling these execution paths.
The use cases for these operations, and things like coroutines built
on top of them, will only increase in the future as developers look
for ways to get...
2010 Apr 11
0
[LLVMdev] Proposal: stack/context switching within a thread
...-------------===//
// Stack and context switching
//===----------------------------------------------------------------------===//
4/07/2010 - Initial Revision
4/11/2010 - Introduced llvm.getcontextstacktop and llvm.stackgrowsdown,
changed the definition of llvm.makecontext slightly, and added a
discussion of context stack space use and possible strategies for
minimizing total memory and address space reserved for stacks.
At the time of this writing, LLVM supports standard function calls on a thread
of execution, but does not support switching...
2020 Mar 27
2
Efficient Green Thread Context-Switching
...iler optimizations can be automatically applied to user-space context switches.
The paper shows the results of many benchmarks, all of which show this model heavily outperforming existing models of context switching, in both speed and memory usage. For example, it mentions that the POSIX functions makecontext() and swapcontext() save a structure that’s 936 bytes in size (768 on my machine), but their model generates context switches that save only 8-80 bytes of CPU state, depending on which existing optimizations are able to apply to the specific context switch. In some cases, the entire context switch...
2010 Apr 11
3
[LLVMdev] Proposal: stack/context switching within a thread
Kenneth Uildriks <kennethuil at gmail.com> wrote:
> As I see it, the context switching mechanism itself needs to know
> where to point the stack register when switching. The C routines take
> an initial stack pointer when creating the context, and keep track of
> it from there. If we don't actually need to interoperate with
> contexts created from the C routines, we have
2020 Mar 27
2
Efficient Green Thread Context-Switching
...0500, Joshua Thomas Wise via llvm-dev wrote:
>> The paper shows the results of many benchmarks, all of which show this
>> model heavily outperforming existing models of context switching, in
>> both speed and memory usage. For example, it mentions that the POSIX
>> functions makecontext() and swapcontext() save a structure that’s 936
>> bytes in size (768 on my machine), but their model generates context
>> switches that save only 8-80 bytes of CPU state, depending on which
>> existing optimizations are able to apply to the specific context switch.
>> In so...
2007 Jul 27
2
[LLVMdev] Forcing JIT of all functions before execution starts (was: Implementing sizeof)
...ead2, 0);
printf("--- Waiting for child threads to terminate\n");
mcp_wait_for_exit();
printf("--- Bye...\n");
return 0;
}
works perfectly, because thread1() and thread2() are forced into
existence before they are referenced by mcp_begin_thread() (i.e. as a
parameter to makecontext). Commenting out the running threads serially
section results in a seg fault inside the jitter. Since we have to make
so many performance compromises in the name of model checking anyway,
it's no big deal for me to just basically force every function in the
module to be compiled before exec...
2007 Jul 27
0
[LLVMdev] Implementing sizeof
Check out http://nondot.org/sabre/LLVMNotes
-Chris
http://nondot.org/sabre
http://llvm.org
On Jul 27, 2007, at 12:00 PM, Sarah Thompson <thompson at email.arc.nasa.gov
> wrote:
> Hi folks,
>
> Assuming that I'm writing a pass and that for bizarre reasons I need
> to
> programmatically do the equivalent of a C/C++ sizeof on a Value (or a
> Type, it doesn't
2010 Apr 10
0
[LLVMdev] Proposal: stack/context switching within a thread
...now the functionality is available, sometimes, from the C
> standard library. But embedded environments (often running a limited
> standard library) and server environments would benefit heavily from a
> standard way to specify context switches within a single thread in the
> style of makecontext/swapcontext/setcontext, and built-in support for
> these operations would also open the way for optimizers to begin
> handling these execution paths.
>
> The use cases for these operations, and things like coroutines built
> on top of them, will only increase in the future as develop...
2007 Jul 27
3
[LLVMdev] Implementing sizeof
Hi folks,
Assuming that I'm writing a pass and that for bizarre reasons I need to
programmatically do the equivalent of a C/C++ sizeof on a Value (or a
Type, it doesn't matter which really), yielding a result in bytes, what
is the known-safe way to do this? I notice that doing something like
struct thingy
{
... some stuff ...
};
...
printf("Size = %d",