blob: 8083057af8265a2a022ca1f205086915e676620e [file] [log] [blame]
Orion Hodsona4731bd2020-11-16 14:56:50 +00001/*
2 * Copyright (C) 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ART_DEXOPTANALYZER_DEXOPTANALYZER_H_
18#define ART_DEXOPTANALYZER_DEXOPTANALYZER_H_
19
20namespace art {
21namespace dexoptanalyzer {
22
23// See OatFileAssistant docs for the meaning of the valid return codes.
24enum class ReturnCode {
25 kNoDexOptNeeded = 0,
26 kDex2OatFromScratch = 1,
27 kDex2OatForBootImageOat = 2,
28 kDex2OatForFilterOat = 3,
29 kDex2OatForBootImageOdex = 4,
30 kDex2OatForFilterOdex = 5,
31
32 // Success return code when executed with --flatten-class-loader-context.
33 // Success is typically signalled with a zero but we use a non-colliding
34 // code to communicate that the flattening code path was taken.
35 kFlattenClassLoaderContextSuccess = 50,
36
37 kErrorInvalidArguments = 101,
38 kErrorCannotCreateRuntime = 102,
39 kErrorUnknownDexOptNeeded = 103
40};
41
Calin Juravle17374092021-06-08 13:45:09 -070042// Accepted values for the profile analysis results.
43enum class ProfileAnalysisResult {
44 kOptimize = 1,
45 kDontOptimizeSmallDelta = 2,
46 kDontOptimizeEmptyProfiles = 3,
47};
48
Orion Hodsona4731bd2020-11-16 14:56:50 +000049} // namespace dexoptanalyzer
50} // namespace art
51
52#endif // ART_DEXOPTANALYZER_DEXOPTANALYZER_H_