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

Interpreting foreign functions call information as activity #60

Open
varosi opened this issue Apr 6, 2017 · 4 comments
Open

Interpreting foreign functions call information as activity #60

varosi opened this issue Apr 6, 2017 · 4 comments

Comments

@varosi
Copy link

varosi commented Apr 6, 2017

Feature request

It'll be great if time between:
"HEC YY: stopping thread ZZZZZ (making a foreign call)" and
"HEC YY: running thread ZZZZZ" where YY and ZZZZZ are same between events and intepret as a single foreign call.

Activity diagram to show it as this thread is doing something foreign and this could be shown as separate coloured activity inside HEC graphs for YY execution unit.

This is a time spent somewhere else, but affecting us as we have to wait for it at this thread, so it's kind of activity albeit it is outside Haskell. It's time spent in foreign call which will be useful to be represented and measured.

@simonmar
Copy link
Member

simonmar commented Apr 7, 2017

The problem is that ThreadScope shows activity on each Haskell HEC, and while an FFI call is running the HEC might be doing something else, like running a different Haskell thread. So you would have potentially multiple FFI calls running at the same time as another Haskell thread (or the GC), it's not clear how to display this.

@varosi
Copy link
Author

varosi commented Apr 8, 2017

hm, but which OS thread is running that FFI call? Isn't it the same OS thread which runs HEC (that calls foreign code) on.

Displaying of FFI activity could be similar to displaying GC trace - with separate band per HEC. Those bands could be shown or hidden with a check boxes that show/hide other traces.

@simonmar
Copy link
Member

simonmar commented Apr 10, 2017

The OS thread that made the FFI call is running, and meanwhile a different OS thread is running the HEC.

So the problem is that ThreadScope shows a HEC-centric view of the execution, whereas you might prefer to see an OS-thread-centric view. That's entirely reasonable, and in that setting it would make sense to show FFI calls, but it's not implemented.

@varosi
Copy link
Author

varosi commented Apr 10, 2017

Ahaa, so that will be useful for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants