File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1954,7 +1954,8 @@ static void record__read_lost_samples(struct record *rec)
1954
1954
1955
1955
if (count .lost ) {
1956
1956
if (!lost ) {
1957
- lost = zalloc (PERF_SAMPLE_MAX_SIZE );
1957
+ lost = zalloc (sizeof (* lost ) +
1958
+ session -> machines .host .id_hdr_size );
1958
1959
if (!lost ) {
1959
1960
pr_debug ("Memory allocation failed\n" );
1960
1961
return ;
@@ -1970,7 +1971,8 @@ static void record__read_lost_samples(struct record *rec)
1970
1971
lost_count = perf_bpf_filter__lost_count (evsel );
1971
1972
if (lost_count ) {
1972
1973
if (!lost ) {
1973
- lost = zalloc (PERF_SAMPLE_MAX_SIZE );
1974
+ lost = zalloc (sizeof (* lost ) +
1975
+ session -> machines .host .id_hdr_size );
1974
1976
if (!lost ) {
1975
1977
pr_debug ("Memory allocation failed\n" );
1976
1978
return ;
You can’t perform that action at this time.
0 commit comments