1syntax = "proto2"; 2 3package android.os.statsd.art; 4 5import "frameworks/proto_logging/stats/atoms.proto"; 6import "frameworks/proto_logging/stats/atom_field_options.proto"; 7import "frameworks/proto_logging/stats/enums/app/job/enums.proto"; 8 9option java_package = "com.android.os.art"; 10option java_multiple_files = true; 11 12extend Atom { 13 optional BackgroundDexoptJobEnded background_dexopt_job_ended = 467 [(module) = "art"]; 14} 15 16/** 17 * Logs when a background dexopt job is ended. 18 * 19 * Logged from: 20 * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java 21 */ 22 message BackgroundDexoptJobEnded { 23 // Corresponds to `BackgroundDexOptService.Status`, except for 24 // `STATUS_JOB_FINISHED`. 25 enum Status { 26 STATUS_UNKNOWN = 0; 27 28 // The job has finished. This value is used even if some packages have 29 // failed compilation during the job. (Corresponds to either 30 // `BackgroundDexOptService.Status.STATUS_OK` or 31 // `BackgroundDexOptService.Status.STATUS_DEX_OPT_FAILED`.) 32 STATUS_JOB_FINISHED = 1; 33 34 // The job is aborted by the job scheduler. The reason is logged in 35 // `cancellation_reason`. 36 STATUS_ABORT_BY_CANCELLATION = 2; 37 38 // The job is aborted by itself because there is no space left. Note 39 // that this does NOT include cases where the job is aborted by the job 40 // scheduler due to no space left, which are logged as 41 // `STATUS_ABORT_BY_CANCELLATION` with `cancellation_reason` being 42 // `STOP_REASON_CONSTRAINT_STORAGE_NOT_LOW`. 43 STATUS_ABORT_NO_SPACE_LEFT = 3; 44 45 // The job is aborted by itself because of thermal issues. Note that 46 // this does NOT include cases where the job is aborted by the job 47 // scheduler due to thermal issues, which are logged as 48 // `STATUS_ABORT_BY_CANCELLATION` with `cancellation_reason` being 49 // `STOP_REASON_DEVICE_STATE`. 50 // 51 // Only applies to the legacy dexopt job. 52 STATUS_ABORT_THERMAL = 4; 53 54 // The job is aborted by itself because of unsatisfied battery level. 55 // Note that this does NOT include cases where the job is aborted by the 56 // job scheduler due to unsatisfied battery level, which are logged as 57 // `STATUS_ABORT_BY_CANCELLATION` with `cancellation_reason` being 58 // `STOP_REASON_CONSTRAINT_BATTERY_NOT_LOW`. 59 // 60 // Only applies to the legacy dexopt job. 61 STATUS_ABORT_BATTERY = 5; 62 63 // The job is aborted by the API 64 // `ArtManagerLocal.cancelBackgroundDexoptJob`. 65 // 66 // Only applies to the background dexopt job in ART Service. 67 STATUS_ABORT_BY_API = 6; 68 69 // The job encountered a fatal error, such as a runtime exception. Note 70 // that this does NOT include cases where the job finishes normally with 71 // some dexopt failures on some apps, which are expected and logged as 72 // `STATUS_JOB_FINISHED`. 73 STATUS_FATAL_ERROR = 7; 74 } 75 76 optional Status status = 1; 77 78 // If `status` is `STATUS_ABORT_BY_CANCELLATION`, the reason of the 79 // cancellation. 80 optional android.app.job.StopReasonEnum cancellation_reason = 2; 81 82 // The duration of the job run, in milliseconds. 83 optional int64 duration_ms = 3; 84 85 // The duration of the job run, in milliseconds, including time spent in 86 // sleep. Deprecated as the job scheduler holds a wake lock, hence this 87 // duration is always going to be the same as above. 88 optional int64 duration_including_sleep_ms = 4 [deprecated = true]; 89}