Mercurial > hg > xemacs-beta
comparison src/profile.c @ 5027:22179cd0fe15
merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Wed, 10 Feb 2010 07:25:19 -0600 |
parents | ae48681c47fa |
children | 9410323e4b0d |
comparison
equal
deleted
inserted
replaced
5026:46cf825f6158 | 5027:22179cd0fe15 |
---|---|
313 | 313 |
314 { | 314 { |
315 long count; | 315 long count; |
316 const void *vval; | 316 const void *vval; |
317 | 317 |
318 if (gethash (LISP_TO_VOID (fun), big_profile_table, &vval)) | 318 if (gethash (STORE_LISP_IN_VOID (fun), big_profile_table, &vval)) |
319 count = (long) vval; | 319 count = (long) vval; |
320 else | 320 else |
321 count = 0; | 321 count = 0; |
322 count++; | 322 count++; |
323 vval = (const void *) count; | 323 vval = (const void *) count; |
324 puthash (LISP_TO_VOID (fun), (void *) vval, big_profile_table); | 324 puthash (STORE_LISP_IN_VOID (fun), (void *) vval, big_profile_table); |
325 } | 325 } |
326 | 326 |
327 profiling_lock = 0; | 327 profiling_lock = 0; |
328 } | 328 } |
329 in_profiling--; | 329 in_profiling--; |
461 Lisp_Object key; | 461 Lisp_Object key; |
462 struct get_profiling_info_closure *closure | 462 struct get_profiling_info_closure *closure |
463 = (struct get_profiling_info_closure *) void_closure; | 463 = (struct get_profiling_info_closure *) void_closure; |
464 EMACS_INT val; | 464 EMACS_INT val; |
465 | 465 |
466 key = VOID_TO_LISP (void_key); | 466 key = GET_LISP_FROM_VOID (void_key); |
467 val = (EMACS_INT) void_val; | 467 val = (EMACS_INT) void_val; |
468 | 468 |
469 Fputhash (key, make_int (val), closure->timing); | 469 Fputhash (key, make_int (val), closure->timing); |
470 return 0; | 470 return 0; |
471 } | 471 } |
522 maphash (get_profiling_info_timing_maphash, big_profile_table, &closure); | 522 maphash (get_profiling_info_timing_maphash, big_profile_table, &closure); |
523 | 523 |
524 /* OK, OK ... the total-timing table is not going to have an entry | 524 /* OK, OK ... the total-timing table is not going to have an entry |
525 for profile overhead, and it looks strange for it to come out 0, | 525 for profile overhead, and it looks strange for it to come out 0, |
526 so make sure it looks reasonable. */ | 526 so make sure it looks reasonable. */ |
527 if (!gethash (LISP_TO_VOID (QSprofile_overhead), big_profile_table, | 527 if (!gethash (STORE_LISP_IN_VOID (QSprofile_overhead), big_profile_table, |
528 &overhead)) | 528 &overhead)) |
529 overhead = 0; | 529 overhead = 0; |
530 Fputhash (QSprofile_overhead, make_int ((EMACS_INT) overhead), | 530 Fputhash (QSprofile_overhead, make_int ((EMACS_INT) overhead), |
531 Vtotal_timing_profile_table); | 531 Vtotal_timing_profile_table); |
532 | 532 |
555 if (!INTP (val)) | 555 if (!INTP (val)) |
556 invalid_argument_2 | 556 invalid_argument_2 |
557 ("Function timing count is not an integer in given entry", | 557 ("Function timing count is not an integer in given entry", |
558 key, val); | 558 key, val); |
559 | 559 |
560 puthash (LISP_TO_VOID (key), (void *) XINT (val), big_profile_table); | 560 puthash (STORE_LISP_IN_VOID (key), (void *) XINT (val), big_profile_table); |
561 | 561 |
562 return 0; | 562 return 0; |
563 } | 563 } |
564 | 564 |
565 DEFUN ("set-profiling-info", Fset_profiling_info, 1, 1, 0, /* | 565 DEFUN ("set-profiling-info", Fset_profiling_info, 1, 1, 0, /* |
607 mark_profiling_info_maphash (const void *void_key, | 607 mark_profiling_info_maphash (const void *void_key, |
608 void *UNUSED (void_val), | 608 void *UNUSED (void_val), |
609 void *UNUSED (void_closure)) | 609 void *UNUSED (void_closure)) |
610 { | 610 { |
611 #ifdef USE_KKCC | 611 #ifdef USE_KKCC |
612 kkcc_gc_stack_push_lisp_object (VOID_TO_LISP (void_key), 0, -1); | 612 kkcc_gc_stack_push_lisp_object (GET_LISP_FROM_VOID (void_key), 0, -1); |
613 #else /* NOT USE_KKCC */ | 613 #else /* NOT USE_KKCC */ |
614 mark_object (VOID_TO_LISP (void_key)); | 614 mark_object (GET_LISP_FROM_VOID (void_key)); |
615 #endif /* NOT USE_KKCC */ | 615 #endif /* NOT USE_KKCC */ |
616 return 0; | 616 return 0; |
617 } | 617 } |
618 | 618 |
619 void | 619 void |