4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: A few problems when profiling. Using flag pointer instead of flag
12 value. Allocating zero bytes. Not freeing used memory.
13 Solution: Remove wrong '&' characters. Skip dumping when there is nothing
14 to dump. Free used memory. (Dominique Pelle)
18 *** ../vim-7.2.004/src/eval.c Fri Aug 8 12:36:31 2008
19 --- src/eval.c Mon Aug 25 04:40:11 2008
25 ! * Return TRUE if typeval "tv" is locked: Either tha value is locked itself or
26 ! * it refers to a List or Dictionary that is locked.
34 ! * Return TRUE if typeval "tv" is locked: Either that value is locked itself
35 ! * or it refers to a List or Dictionary that is locked.
42 res = ITEM_COMPARE_FAIL;
44 - /* return value has wrong type */
45 res = get_tv_number_chk(&rettv, &item_compare_func_err);
46 if (item_compare_func_err)
47 ! res = ITEM_COMPARE_FAIL;
53 res = ITEM_COMPARE_FAIL;
55 res = get_tv_number_chk(&rettv, &item_compare_func_err);
56 if (item_compare_func_err)
57 ! res = ITEM_COMPARE_FAIL; /* return value has wrong type */
66 todo = (int)func_hashtab.ht_used;
68 + return; /* nothing to dump */
70 sorttab = (ufunc_T **)alloc((unsigned)(sizeof(ufunc_T) * todo));
72 for (hi = func_hashtab.ht_array; todo > 0; ++hi)
77 prof_sort_list(fd, sorttab, st_len, "SELF", TRUE);
86 if (!fp->uf_profiling && has_profiling(FALSE, fp->uf_name, NULL))
89 ! || (fc.caller != NULL && &fc.caller->func->uf_profiling))
92 profile_start(&call_start);
94 if (!fp->uf_profiling && has_profiling(FALSE, fp->uf_name, NULL))
97 ! || (fc.caller != NULL && fc.caller->func->uf_profiling))
100 profile_start(&call_start);
105 if (do_profiling == PROF_YES && (fp->uf_profiling
106 ! || (fc.caller != NULL && &fc.caller->func->uf_profiling)))
108 profile_end(&call_start);
109 profile_sub_wait(&wait_start, &call_start);
110 profile_add(&fp->uf_tm_total, &call_start);
111 profile_self(&fp->uf_tm_self, &call_start, &fp->uf_tm_children);
112 ! if (fc.caller != NULL && &fc.caller->func->uf_profiling)
114 profile_add(&fc.caller->func->uf_tm_children, &call_start);
115 profile_add(&fc.caller->func->uf_tml_children, &call_start);
119 if (do_profiling == PROF_YES && (fp->uf_profiling
120 ! || (fc.caller != NULL && fc.caller->func->uf_profiling)))
122 profile_end(&call_start);
123 profile_sub_wait(&wait_start, &call_start);
124 profile_add(&fp->uf_tm_total, &call_start);
125 profile_self(&fp->uf_tm_self, &call_start, &fp->uf_tm_children);
126 ! if (fc.caller != NULL && fc.caller->func->uf_profiling)
128 profile_add(&fc.caller->func->uf_tm_children, &call_start);
129 profile_add(&fc.caller->func->uf_tml_children, &call_start);
130 *** ../vim-7.2.004/src/version.c Mon Aug 25 04:35:13 2008
131 --- src/version.c Mon Aug 25 04:46:44 2008
135 { /* Add new patch number below this line */
141 The process for understanding customers primarily involves sitting around with
142 other marketing people and talking about what you would to if you were dumb
143 enough to be a customer.
144 (Scott Adams - The Dilbert principle)
146 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
147 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
148 \\\ download, build and distribute -- http://www.A-A-P.org ///
149 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///