1 /* 2 * Copyright (C) 2019 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_LIBARTPALETTE_INCLUDE_PALETTE_PALETTE_METHOD_LIST_H_ 18 #define ART_LIBARTPALETTE_INCLUDE_PALETTE_PALETTE_METHOD_LIST_H_ 19 20 #include <stdbool.h> 21 #include <stddef.h> 22 #include <stdint.h> 23 24 #include "jni.h" 25 26 // Methods in version 1 API 27 #define PALETTE_METHOD_LIST(M) \ 28 M(PaletteSchedSetPriority, int32_t tid, int32_t java_priority) \ 29 M(PaletteSchedGetPriority, int32_t tid, /*out*/int32_t* java_priority) \ 30 M(PaletteWriteCrashThreadStacks, const char* stacks, size_t stacks_len) \ 31 M(PaletteTraceEnabled, /*out*/bool* enabled) \ 32 M(PaletteTraceBegin, const char* name) \ 33 M(PaletteTraceEnd) \ 34 M(PaletteTraceIntegerValue, const char* name, int32_t value) \ 35 M(PaletteAshmemCreateRegion, const char* name, size_t size, int* fd) \ 36 M(PaletteAshmemSetProtRegion, int, int) \ 37 /* Create the staging directory for on-device signing. */ \ 38 /* `staging_dir` is updated to point to a constant string in the */ \ 39 /* palette implementation. */ \ 40 /* This method is not thread-safe. */ \ 41 M(PaletteCreateOdrefreshStagingDirectory, /*out*/const char** staging_dir)\ 42 M(PaletteShouldReportDex2oatCompilation, bool*) \ 43 M(PaletteNotifyStartDex2oatCompilation, int source_fd, \ 44 int art_fd, \ 45 int oat_fd, \ 46 int vdex_fd) \ 47 M(PaletteNotifyEndDex2oatCompilation, int source_fd, \ 48 int art_fd, \ 49 int oat_fd, \ 50 int vdex_fd) \ 51 M(PaletteNotifyDexFileLoaded, const char* path) \ 52 M(PaletteNotifyOatFileLoaded, const char* path) \ 53 M(PaletteShouldReportJniInvocations, bool*) \ 54 M(PaletteNotifyBeginJniInvocation, JNIEnv* env) \ 55 M(PaletteNotifyEndJniInvocation, JNIEnv* env) \ 56 M(PaletteReportLockContention, JNIEnv* env, \ 57 int32_t wait_ms, \ 58 const char* filename, \ 59 int32_t line_number, \ 60 const char* method_name, \ 61 const char* owner_filename, \ 62 int32_t owner_line_number, \ 63 const char* owner_method_name, \ 64 const char* proc_name, \ 65 const char* thread_name) \ 66 67 #endif // ART_LIBARTPALETTE_INCLUDE_PALETTE_PALETTE_METHOD_LIST_H_ 68