Comments (6)
maybe the stack is too small
from context.
But the 2 stacks are allocated on the heap with the stack allocator isn't it ?
FYI, here are the value of the registers (it's the popping of RBP valgrind complains about):
(gdb) i r
rax 0x7fffffffdb08 140737488345864
rbx 0x0 0
rcx 0x0 0
rdx 0x62ac60 6466656
rsi 0x7fffffffd8e8 140737488345320
rdi 0x7fffffffdb08 140737488345864
rbp 0x7fffffffdb60 0x7fffffffdb60
rsp 0x7fffffffda70 0x7fffffffda70
r8 0xffffffffffffffff -1
r9 0x0 0
r10 0x22 34
r11 0x246 582
r12 0x4016c0 4200128
r13 0x7fffffffdc40 140737488346176
r14 0x0 0
r15 0x0 0
rip 0x4017e4 0x4017e4 <main()+42>
eflags 0x202 [ IF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
(gdb) c
Continuing.
Breakpoint 2, <lambda()>::operator()(void) const (__closure=0x64ae20) at ../examples/nested.cpp:23
23 auto&& leafTask = scheduler.makeTask<void>();
(gdb) i r
rax 0x64ae20 6598176
rbx 0x40c40c 4244492
rcx 0x0 0
rdx 0x64ae20 6598176
rsi 0x64aa97 6597271
rdi 0x64ae20 6598176
rbp 0x64a9a0 0x64a9a0
rsp 0x64a980 0x64a980
r8 0x40c863 4245603
r9 0x0 0
r10 0xa42 2626
r11 0x7ffff7adeaf0 140737348758256
r12 0x7ffff7f15018 140737353175064
r13 0x0 0
r14 0x0 0
r15 0x0 0
rip 0x4017a4 0x4017a4 <<lambda()>::operator()(void) const+12>
eflags 0x202 [ IF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
edit: The first display is the first (non-nested) makeTask.
from context.
Mea culpa. Nothing to do with boost_context, I had forgotten a return there, so it failed on the allocation of the second buffer by my home-made allocator, I should have looked at the back-trace better. Sorry for disturbing you. :(
Thanks and have a nice day !
from context.
Now ~1s for more than half a million tasks (1<<19) in a binary-tree-like DAG on my old 4300FX (on a single core of course). Not too bad ! I will try to profile to see what took most of the time. Pretty sure it's the context switch but cannot be too sure. Sorry again for bothering you and thanks for your work ! :)
from context.
I guess that the memory allcoation/deallocation cosnumes most of the time.
(at my E5-2620 v4 a pure context switch costs 9 cpu cycles)
from context.
I need to go, but it seems you're right: https://ibb.co/bYbpic.
edit: I am even wondering if there isn't something wrong. There are a lot of allocations.
from context.
Related Issues (20)
- how to set size of 'protected_fixedsize_stack' ? HOT 1
- Floating point registers are not preserved HOT 1
- Build failing in develop branch on Windows x64 HOT 2
- The ucontext headers always use code for macOS. HOT 2
- Delete
- Segfault with ucontext on macOS (#184, continued) HOT 3
- CMake builds fails on QNX (qcc): Incorrect assembler invocation
- Not able to build for windows ARM64 with msvc toolset HOT 6
- Is the performance of boost context slow on kernel 3.10 like Centos7 HOT 1
- Asm parts are not compiled when building boost 1.83 on riscv64 linux HOT 7
- CMAKE_SIZEOF_VOID_P is empty when trying to build HOT 1
- ontop implementation on x86-64 sysv
- implementation doesn't match what the doc said HOT 1
- ASM support for sparc64 systems HOT 1
- Failure to assemble ARM64 code with MSVC's ARMASM64 HOT 2
- 1.85.0 Beta 1 RC 1 does not build on Mac OS X with gcc HOT 4
- Modular Boost C++ Libraries Request
- unknown feature "<context-impl>" HOT 1
- [VS17.10.1][amd64][x86] error: No best alternative for libs/context/build/asm_sources HOT 1
- gcc-14: map_shadow_stack incorrect syscall number
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from context.