Bob Chen
Bob Chen
WorkPool will call `photon::init` for every vCPU it created. You can imagine it as a dispatcher of tasks(functions/lambdas) to vCPUs. See this demo https://github.com/alibaba/PhotonLibOS/blob/main/thread/test/perf_workpool.cpp
yes, main thread can become vCPU, as long as you have called photon::init However, main thread/vCPU is not included in the WorkPool, even workpool is usually created from the main...
The current Photon CMake didn't separate modules into different libs, so my suggestion is to use libphoton.a or libphoton.so directly. https://photonlibos.github.io/docs/introduction/how-to-integrate
1. No you don't. You only need to link to `photon_static`. 2. net/http is already in `photon_static` 3. Same as above add_executable(client_https client_https.cpp) target_link_libraries(client_https photon_static)
@TrKNguyen You may try using a container to compile you code. `docker pull ghcr.io/alibaba/photon-ut-base:latest` Our CI script is here. https://github.com/alibaba/PhotonLibOS/blob/55ab58bfb1eee45f2e4b071c0cc6abb5e9a77923/.github/workflows/ci.linux.x86_64.yml#L177
For a photon thread created by `photon::thread_create/photon::thread_create11`, the top-most function in its call stack will have the function name "unknown". Likewise, for the std::thread, the top function is usually `clone`
As to the high proportion of [unknown], can you first try `perf top -p ` with your program, and make sure you have build photon with debug-info(cmake)