@@ -1771,11 +1771,6 @@ static int resolve_lbr_callchain_sample(struct thread *thread,
1771
1771
*/
1772
1772
int mix_chain_nr = i + 1 + lbr_nr + 1 ;
1773
1773
1774
- if (mix_chain_nr > (int )sysctl_perf_event_max_stack + PERF_MAX_BRANCH_DEPTH ) {
1775
- pr_warning ("corrupted callchain. skipping...\n" );
1776
- return 0 ;
1777
- }
1778
-
1779
1774
for (j = 0 ; j < mix_chain_nr ; j ++ ) {
1780
1775
if (callchain_param .order == ORDER_CALLEE ) {
1781
1776
if (j < i + 1 )
@@ -1815,7 +1810,7 @@ static int thread__resolve_callchain_sample(struct thread *thread,
1815
1810
struct ip_callchain * chain = sample -> callchain ;
1816
1811
int chain_nr = chain -> nr ;
1817
1812
u8 cpumode = PERF_RECORD_MISC_USER ;
1818
- int i , j , err , nr_entries , nr_contexts ;
1813
+ int i , j , err , nr_entries ;
1819
1814
int skip_idx = -1 ;
1820
1815
int first_call = 0 ;
1821
1816
@@ -1830,8 +1825,7 @@ static int thread__resolve_callchain_sample(struct thread *thread,
1830
1825
* Based on DWARF debug information, some architectures skip
1831
1826
* a callchain entry saved by the kernel.
1832
1827
*/
1833
- if (chain_nr < sysctl_perf_event_max_stack )
1834
- skip_idx = arch_skip_callchain_idx (thread , chain );
1828
+ skip_idx = arch_skip_callchain_idx (thread , chain );
1835
1829
1836
1830
/*
1837
1831
* Add branches to call stack for easier browsing. This gives
@@ -1891,7 +1885,7 @@ static int thread__resolve_callchain_sample(struct thread *thread,
1891
1885
}
1892
1886
1893
1887
check_calls :
1894
- for (i = first_call , nr_entries = 0 , nr_contexts = 0 ;
1888
+ for (i = first_call , nr_entries = 0 ;
1895
1889
i < chain_nr && nr_entries < max_stack ; i ++ ) {
1896
1890
u64 ip ;
1897
1891
@@ -1906,13 +1900,8 @@ static int thread__resolve_callchain_sample(struct thread *thread,
1906
1900
#endif
1907
1901
ip = chain -> ips [j ];
1908
1902
1909
- if (ip >= PERF_CONTEXT_MAX ) {
1910
- if (++ nr_contexts > sysctl_perf_event_max_contexts_per_stack )
1911
- goto out_corrupted_callchain ;
1912
- } else {
1913
- if (++ nr_entries > sysctl_perf_event_max_stack )
1914
- goto out_corrupted_callchain ;
1915
- }
1903
+ if (ip < PERF_CONTEXT_MAX )
1904
+ ++ nr_entries ;
1916
1905
1917
1906
err = add_callchain_ip (thread , cursor , parent , root_al , & cpumode , ip );
1918
1907
@@ -1921,10 +1910,6 @@ static int thread__resolve_callchain_sample(struct thread *thread,
1921
1910
}
1922
1911
1923
1912
return 0 ;
1924
-
1925
- out_corrupted_callchain :
1926
- pr_warning ("corrupted callchain. skipping...\n" );
1927
- return 0 ;
1928
1913
}
1929
1914
1930
1915
static int unwind_entry (struct unwind_entry * entry , void * arg )
0 commit comments