File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -150,9 +150,18 @@ class ProfilerDebugAdapter extends debugadapter.LoggingDebugSession {
150150 let target : Device = config . target ;
151151
152152 try {
153- this . consoleLog ( "Setup simpleperf on device" ) ;
154153 const deviceAdb = await android . getDeviceAdb ( target ) ;
155- const simpleperfDevicePath = await android . pushSimpleperf ( deviceAdb ) ;
154+
155+ // Use system simpleperf for API level 29 and above
156+ let simpleperfDevicePath : string ;
157+ const apiLevel = await deviceAdb . getApiLevel ( ) ;
158+ if ( apiLevel >= 29 ) {
159+ simpleperfDevicePath = "/system/bin/simpleperf" ;
160+ }
161+ else {
162+ this . consoleLog ( "Setup simpleperf on device" ) ;
163+ simpleperfDevicePath = await android . pushSimpleperf ( deviceAdb ) ;
164+ }
156165
157166 const simpleperfCommand = await this . getSimpleperfCommand ( deviceAdb , simpleperfDevicePath ) ;
158167
You can’t perform that action at this time.
0 commit comments