Skip to content

Ptrace vfork#1128

Merged
sporksmith merged 2 commits intoshadow:devfrom
sporksmith:ptrace-vfork
Mar 2, 2021
Merged

Ptrace vfork#1128
sporksmith merged 2 commits intoshadow:devfrom
sporksmith:ptrace-vfork

Conversation

@sporksmith
Copy link
Copy Markdown
Contributor

Use vfork in thread_ptrace

@sporksmith sporksmith force-pushed the ptrace-vfork branch 3 times, most recently from 101eca4 to 527817c Compare February 27, 2021 18:26
@sporksmith sporksmith marked this pull request as ready for review February 27, 2021 18:26
@sporksmith
Copy link
Copy Markdown
Contributor Author

Hmm, I was expecting the timeouts in the coverage build to go away once #1131 was merged, but they didn't.

Looking more closely, there are a lot of lines like:

profiling: /__w/shadow/shadow/build/src/main/CMakeFiles/shadow.dir/main.c.gcda: cannot merge previous run count: corrupt object tag (0x01000000)

I suspect that the profiling code ends up corrupting its in-memory data structures due to the code in between the vfork and the exec. I'll arrange to use fork in coverage builds.

This is a substantial performance savings in experiments with many
hosts.

This is an item in shadow#1041
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 2, 2021

Codecov Report

Merging #1128 (58a7d25) into dev (b72c1cf) will decrease coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1128      +/-   ##
==========================================
- Coverage   57.06%   56.96%   -0.11%     
==========================================
  Files         136      136              
  Lines       20133    20130       -3     
  Branches     4842     4841       -1     
==========================================
- Hits        11489    11467      -22     
- Misses       5670     5687      +17     
- Partials     2974     2976       +2     
Flag Coverage Δ
tests 56.96% <100.00%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/main/host/thread_ptrace.c 63.21% <100.00%> (-2.05%) ⬇️
src/main/host/syscall/process.c 23.68% <0.00%> (-7.90%) ⬇️
src/main/host/process.c 71.62% <0.00%> (-0.55%) ⬇️
src/main/host/syscall_handler.c 54.78% <0.00%> (-0.44%) ⬇️
src/support/logger/rust_bindings/src/lib.rs 40.26% <0.00%> (-0.15%) ⬇️
src/main/host/descriptor/file.c 31.13% <0.00%> (+0.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b72c1cf...ffbd763. Read the comment docs.

@sporksmith sporksmith merged commit cd42474 into shadow:dev Mar 2, 2021
@sporksmith sporksmith deleted the ptrace-vfork branch March 2, 2021 02:42
@robgjansen robgjansen added the Tag: Performance Related to improving shadow's run-time label Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Main Composing the core Shadow executable Tag: Performance Related to improving shadow's run-time

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants