Skip to content

Commit 1613b3b

Browse files
committed
Small cleanup and possible bugfix in Profile
1 parent 220064e commit 1613b3b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

base/profile.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ stop_timer() = ccall(:profile_stop_timer, Void, ())
6363

6464
get_data_pointer() = convert(Ptr{Uint}, ccall(:profile_get_data, Ptr{Uint8}, ()))
6565

66-
len_data() = convert(Int, ccall(:profile_len_data, Uint, ()))
66+
len_data() = convert(Int, ccall(:profile_len_data, Csize_t, ()))
6767

68-
maxlen_data() = convert(Int, ccall(:profile_maxlen_data, Uint, ()))
68+
maxlen_data() = convert(Int, ccall(:profile_maxlen_data, Csize_t, ()))
6969

7070
function lookup(ip::Uint, doCframes::Bool)
7171
info = ccall(:jl_lookup_code_address, Any, (Ptr{Void}, Bool), ip, doCframes)

src/profile.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ DLLEXPORT int profile_init(size_t maxsize, u_int64_t delay_nsec)
202202
bt_data_prof = (ptrint_t*) malloc(maxsize*sizeof(ptrint_t));
203203
if (bt_data_prof == NULL && maxsize > 0)
204204
return -1;
205+
bt_size_cur = 0;
205206
return 0;
206207
}
207208

0 commit comments

Comments
 (0)