]> git.eshelyaron.com Git - emacs.git/commitdiff
* comp.c (maybe_defer_native_compilation): Add some debug code
authorAndrea Corallo <akrl@sdf.org>
Sun, 22 Mar 2020 14:50:01 +0000 (14:50 +0000)
committerAndrea Corallo <akrl@sdf.org>
Sun, 22 Mar 2020 16:11:45 +0000 (16:11 +0000)
src/comp.c

index 55e6e96ec81da1bb7070a38540e5aea65d5fc61b..f5961c7d2b6c785218b1c0bd701044dba4fea95d 100644 (file)
@@ -3368,6 +3368,27 @@ void
 maybe_defer_native_compilation (Lisp_Object function_name,
                                Lisp_Object definition)
 {
+#if 0
+#include <sys/types.h>
+#include <unistd.h>
+  if (!NILP (function_name) &&
+      STRINGP (Vload_file_name))
+    {
+      static FILE *f;
+      if (!f)
+       {
+         char str[128];
+         sprintf (str, "log_%d", getpid());
+         f = fopen (str, "w");
+       }
+      if (!f)
+       exit (1);
+      fprintf (f, "function %s file %s\n",
+              SSDATA (Fsymbol_name (function_name)),
+              SSDATA (Vload_file_name));
+      fflush (f);
+    }
+#endif
   if (!comp_deferred_compilation
       || noninteractive
       || !NILP (Vpurify_flag)