diff options
Diffstat (limited to 'src/pdumper.c')
| -rw-r--r-- | src/pdumper.c | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/src/pdumper.c b/src/pdumper.c index cd242f7dc9f..b51a3797dd4 100644 --- a/src/pdumper.c +++ b/src/pdumper.c | |||
| @@ -5568,23 +5568,38 @@ pdumper_load (const char *dump_filename) | |||
| 5568 | return err; | 5568 | return err; |
| 5569 | } | 5569 | } |
| 5570 | 5570 | ||
| 5571 | DEFUN ("pdumper-stats", | 5571 | DEFUN ("pdumper-stats", Fpdumper_stats, Spdumper_stats, 0, 0, 0, |
| 5572 | Fpdumper_stats, Spdumper_stats, | 5572 | doc: /* Return statistics about portable dumping used by this session. |
| 5573 | 0, 0, 0, | 5573 | If this Emacs sesion was started from a portable dump file, |
| 5574 | doc: /* Return an alist of statistics about dump file that | 5574 | the return value is an alist of the form: |
| 5575 | started this Emacs, if any. Nil if this Emacs was not | 5575 | |
| 5576 | started using a portable dumper dump file.*/) | 5576 | ((dumped-with-pdumper . t) (load-time . TIME) (dump-file-name . FILE)) |
| 5577 | |||
| 5578 | where TIME is the time in milliseconds it took to restore Emacs state | ||
| 5579 | from the dump file, and FILE is the name of the dump file. | ||
| 5580 | Value is nil if this session was not started using a portable dump file.*/) | ||
| 5577 | (void) | 5581 | (void) |
| 5578 | { | 5582 | { |
| 5579 | if (!dumped_with_pdumper_p ()) | 5583 | if (!dumped_with_pdumper_p ()) |
| 5580 | return Qnil; | 5584 | return Qnil; |
| 5581 | 5585 | ||
| 5582 | return CALLN ( | 5586 | Lisp_Object dump_fn; |
| 5583 | Flist, | 5587 | #ifdef WINDOWSNT |
| 5584 | Fcons (Qdumped_with_pdumper, Qt), | 5588 | char dump_fn_utf8[MAX_UTF8_PATH]; |
| 5585 | Fcons (Qload_time, make_float (dump_private.load_time)), | 5589 | if (filename_from_ansi (dump_private.dump_filename, dump_fn_utf8) == 0) |
| 5586 | Fcons (Qdump_file_name, | 5590 | dump_fn = DECODE_FILE (build_unibyte_string (dump_fn_utf8)); |
| 5587 | build_unibyte_string (dump_private.dump_filename))); | 5591 | else |
| 5592 | dump_fn = build_unibyte_string (dump_private.dump_filename); | ||
| 5593 | #else | ||
| 5594 | dump_fn = DECODE_FILE (build_unibyte_string (dump_private.dump_filename)); | ||
| 5595 | #endif | ||
| 5596 | |||
| 5597 | dump_fn = Fexpand_file_name (dump_fn, Qnil); | ||
| 5598 | |||
| 5599 | return CALLN (Flist, | ||
| 5600 | Fcons (Qdumped_with_pdumper, Qt), | ||
| 5601 | Fcons (Qload_time, make_float (dump_private.load_time)), | ||
| 5602 | Fcons (Qdump_file_name, dump_fn)); | ||
| 5588 | } | 5603 | } |
| 5589 | 5604 | ||
| 5590 | #endif /* HAVE_PDUMPER */ | 5605 | #endif /* HAVE_PDUMPER */ |