Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

A promising approach for debugging remote promises

320 views

Published on

Presentation of IWST16, Prag

Video: https://youtu.be/jQQqsrfRgjo

Published in: Software
  • Video: https://youtu.be/jQQqsrfRgjo
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

A promising approach for debugging remote promises

  1. 1. A PROMISING APPROACH TO DEBUGGING REMOTE PROMISES 2016 Max Leske Andrei Chiș Oscar Nierstrasz
  2. 2. DISCLAIMER
  3. 3. MOTIVATION
  4. 4. request file list display file list receive file list
  5. 5. request file list display file list receive file list
  6. 6. request file list PROMISE receive file list use use continue
  7. 7. fileListPromise := [ self getFileList ] promise. fileListPromise value. …
  8. 8. request file list what happened?
  9. 9. stack tracestack trace descriptiondescription NULLNULL what happened? exception object
  10. 10. IDEA
  11. 11. 1 sender receiver 1 Object Context CompiledMethod 1 method Process suspendedContext 1
  12. 12. sender nil sender Process suspendedContext
  13. 13. sender nil sender Process1 suspendedContext sender nil sender Process2 suspendedContext
  14. 14. sender Process1+2 suspendedContext sender sender sender sender nil
  15. 15. DEMO
  16. 16. MEMORY
  17. 17. object header: 64 bits 2 pinned / immutable slots 8 identity hash 22 format 5 class index 22 unused 2 garbage collection 3
  18. 18. object header extended header slot 0 slot 1 slot 2 … object
  19. 19. object header Context method closureOrNil stackp receiver sender pc 16 / 56 variable slots no extended header required 96 / 256 bytes per instance
  20. 20. ∑ ≪ 100 000 ~ 1000 small contexts: 96 kB large contexts: 256 kB * 2 (reification) small contexts: 192 kB large contexts: 512 kB estimated upper bounds
  21. 21. memory consumption of contexts:
  22. 22. object graph (simplified) garbage collector partially collected
  23. 23. garbage collector not collected copy
  24. 24. memory consumption of object graph: ?
  25. 25. PERFORMANCE
  26. 26. fileListPromise := [ self getFileList ] promise. fileListPromise value. … copy process full copy reify contexts
  27. 27. copying stack of 100 000 frames 0 MS 125 MS 250 MS 375 MS 500 MS SMALL CONTEXTS LARGE CONTEXTS SMALL CONTEXTS LARGE CONTEXTS with GC without GC
  28. 28. performance:
  29. 29. REMOTE COMMUNICATION
  30. 30. protocol? SeamlessSeamless
  31. 31. DEBUGGING serialised process local copy of process proxies
  32. 32. THREADS promises events asynchronous messages (actors) asynchronous network requests
  33. 33. request file list what happened? copy process full copy reify contexts Process1+2 suspendedContext sender nil sender sender sender sender

×