Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

engine: Separate JIT traces for each app callback #1242

Merged
merged 3 commits into from
Dec 12, 2017

Conversation

lukego
Copy link
Member

@lukego lukego commented Nov 5, 2017

This branch makes the engine ensure that JIT traces never cross between the engine and app callbacks. This is intended both to make JIT trace dumps more readable (don't mix engine and apps in the same trace) and to limit the impact of issues like JIT blacklistings (prevent problems in one app from propagating into other apps or the engine.)

This is achieved using a new primitive function jit.tracebarrier() that JIT traces cannot cross. During recording, a call to jit.tracebarrier() will immediately finish the current trace and then start a new root trace. This appears as a "trace stitch" in the log.

This branch makes the engine execute such a trace barrier immediately before and after each call to an app.

Performance impact needs to be evaluated. See also raptorjit/raptorjit#115.

Create an execution barrier that a JIT trace cannot cross. During
recording, the current trace must end when it reaches a barrier and
then a new root trace starts immediately afterwards.

This is implemented as a simple "nop" C library function. The existing
"trace stitching" mechanism provides the required semantics i.e. stop
current trace, call nop function, start new trace with linkage.
eugeneia added a commit to eugeneia/snabb that referenced this pull request Nov 7, 2017
@lukego
Copy link
Member Author

lukego commented Nov 17, 2017

Early feedback seems to be that this change does not introduce problems, but it remains to be seen how effective it really is for simplifying performance diagnostics. I will see if it helps to resolve #1239 before really proposing it for merge.

lukego added a commit to lukego/snabb that referenced this pull request Dec 5, 2017
@eugeneia eugeneia merged commit e8c0808 into snabbco:master Dec 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants