Mercurial > flash_v2
changeset 969:cc4da808d3e1
* src/profile.c (profile_on): Clear profile before use. Reported
by Suzuki, Ryouzaburou.
| author | jlarmour |
|---|---|
| date | Sun, 27 Apr 2003 21:55:13 +0000 |
| parents | cb24fba154f5 |
| children | dd13b166d166 |
| files | packages/services/profile/gprof/current/ChangeLog packages/services/profile/gprof/current/src/profile.c |
| diffstat | 2 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/services/profile/gprof/current/ChangeLog +++ b/packages/services/profile/gprof/current/ChangeLog @@ -1,3 +1,8 @@ +2003-04-27 Jonathan Larmour <jifl@eCosCentric.com> + + * src/profile.c (profile_on): Clear profile before use. Reported + by Suzuki, Ryouzaburou. + 2003-02-24 Jonathan Larmour <jifl@eCosCentric.com> * cdl/profile_gprof.cdl: Add doc link.
--- a/packages/services/profile/gprof/current/src/profile.c +++ b/packages/services/profile/gprof/current/src/profile.c @@ -52,6 +52,7 @@ #include <pkgconf/profile_gprof.h> #include <stdlib.h> +#include <string.h> #include <cyg/infra/diag.h> #include <network.h> #include <tftp_support.h> @@ -231,6 +232,7 @@ profile_on(void *_start, void *_end, int diag_printf("Can't allocate profile buffer - ignored\n"); return; } + memset(profile, 0, (num_buckets*2)); enabled = 1; diag_printf("Profile from %p..%p[%p], in %d buckets of size %d\n", start_addr, end_addr, _end, num_buckets, bucket_size); @@ -240,3 +242,5 @@ profile_on(void *_start, void *_end, int // Create a TFTP server to provide the data tftp_server_id = tftpd_start(CYGNUM_PROFILE_TFTP_PORT, &profile_fileops); } + +// EOF profile.c
