This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, committed] Make jit/notes.txt better reflect current status quo


The high-level overview diagram in jit/notes.txt showed the
release of the JIT mutex in where I'd like it to be, rather
than where it currently is.

Fix the diagram to reflect reality, and clarify various other things.

Committed to trunk as r218488.

gcc/jit/ChangeLog:
	* notes.txt: Show the beginning and ending of
	recording::context::compile vs playback::context::compile.  Show
	the creation and unlinking of the tempdir.  Show toplev::finalize.
	Move "RELEASE MUTEX" to the correct location.  Show
	gcc_jit_result_release, and indicate where the
	dlopen/dlsym/dlclose occur.
---
 gcc/jit/notes.txt | 38 ++++++++++++++++++++++++++++++++++----
 1 file changed, 34 insertions(+), 4 deletions(-)

diff --git a/gcc/jit/notes.txt b/gcc/jit/notes.txt
index d337cb4..12bb6d6 100644
--- a/gcc/jit/notes.txt
+++ b/gcc/jit/notes.txt
@@ -18,9 +18,13 @@ Client Code   . Generated .            libgccjit.so
    â          .           .          .               .
    V          .           .  gcc_jit_context_compile .
     ââââââââââââââââââââââââââ>      .               .
+              .           .    â start of recording::context::compile ()
               .           .    â     .               .
               .           .    â ACQUIRE MUTEX       .
               .           .    â     .               .
+              .           .    â start of playback::context::compile ()
+              .           .    â   (create tempdir)  .
+              .           .    â     .               .
               .           .    Vâââââââââââââââââââââââ> toplev::main (for now)
               .           .          .               .       â
               .           .          .               .   (various code)
@@ -65,13 +69,33 @@ Client Code   . Generated .            libgccjit.so
               .           .          .               .   (the middleâend and backend)
               .           .          .               .       â
               .           .    <âââââââââââââââââââââââââââââ end of toplev::main
-              .           .    â RELEASE MUTEX       .
               .           .    â     .               .
-              .           .    â Convert assembler to DSO
+              .           .    Vâââââââââââââââââââââââ> toplev::finalize
+              .           .          .               . â   (purge internal state)
+              .           .    <ââââââââââââââââââââââââ end of toplev::finalize
+              .           .    â     .               .
+              .           .    â Convert assembler to DSO ("fake.so")
+              .           .    â     .               .
+              .           .    â Load DSO (dlopen "fake.so")
               .           .    â     .               .
-              .           .    â Load DSO            .
+              .           .    â end of playback::context::compile ()
+              .           .    â     .               .
+              .           .    â playback::context dtor
+              .           .     ââ>  .               .
+              .           .       â Cleanup tempdir  .
+              .           .       â   ("fake.so" is unlinked from the
+              .           .       â    filesystem at this point)
+              .           .    <ââ   .               .
+              .           .    â     .               .
+              .           .    â RELEASE MUTEX       .
+              .           .    â     .               .
+              .           .    â end of recording::context::compile ()
    <âââââââââââââââââââââââââââ      .               .
    â          .           .          .               .
+   V          .           .  gcc_jit_result_get_code .
+    ââââââââââââââââââââââââââ>      .               .
+              .           .    â dlsym () within loaded DSO
+   <âââââââââââââââââââââââââââ      .               .
    Get (void*).           .          .               .
    â          .           .          .               .
    â Call it  .           .          .               .
@@ -80,5 +104,11 @@ Client Code   . Generated .            libgccjit.so
               .    â      .          .               .
    <âââââââââââââââ       .          .               .
    â          .           .          .               .
+etcâ          .           .          .               .
+   â          .           .          .               .
+   V          .           .  gcc_jit_result_release  .
+    ââââââââââââââââââââââââââ>      .               .
+              .           .    â dlclose () the loaded DSO
+              .           .    â    (code becomes uncallable)
+   <âââââââââââââââââââââââââââ      .               .
    â          .           .          .               .
-etc
-- 
1.8.5.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]