gc_hal_dump.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /****************************************************************************
  2. *
  3. * Copyright (c) 2005 - 2021 by Vivante Corp. All rights reserved.
  4. *
  5. * The material in this file is confidential and contains trade secrets
  6. * of Vivante Corporation. This is proprietary information owned by
  7. * Vivante Corporation. No part of this work may be disclosed,
  8. * reproduced, copied, transmitted, or used in any way for any purpose,
  9. * without the express written permission of Vivante Corporation.
  10. *
  11. *****************************************************************************/
  12. #ifndef __gc_hal_dump_h_
  13. #define __gc_hal_dump_h_
  14. /*
  15. gcdDUMP_KEY
  16. Set this to a string that appears in 'cat /proc/<pid>/cmdline'. E.g. 'camera'.
  17. HAL will create dumps for the processes matching this key.
  18. */
  19. #ifndef gcdDUMP_KEY
  20. # define gcdDUMP_KEY "process"
  21. #endif
  22. /*
  23. gcdDUMP_PATH
  24. The dump file location. Some processes cannot write to the sdcard.
  25. Try apps' data dir, e.g. /data/data/com.android.launcher
  26. */
  27. #ifndef gcdDUMP_PATH
  28. #if defined(ANDROID)
  29. # define gcdDUMP_PATH "/mnt/sdcard/"
  30. #else
  31. # define gcdDUMP_PATH "./"
  32. #endif
  33. #endif
  34. /*
  35. gcdDUMP_FILE_IN_KERNEL
  36. Default dump file for gcdDUMP_IN_KERNEL.
  37. The file will be writen globally in kernel side.
  38. Can be overwriten in runtime by debugfs:/gc/dump/dump_file
  39. 2 pseudo files:
  40. [dmesg]: means dump to kernel debug message.
  41. [ignored]: means dump ignored, nothing will be dumpped.
  42. */
  43. #ifndef gcdDUMP_FILE_IN_KERNEL
  44. # define gcdDUMP_FILE_IN_KERNEL "[dmesg]"
  45. #endif
  46. /*
  47. gcdDUMP_VERIFY_PER_DRAW
  48. Sub feature of gcdDUMP.
  49. When set to 1, verify RT and images(if used) for every single draw to ease simulation debug.
  50. Only valid for ES3 driver for now.
  51. */
  52. #ifndef gcdDUMP_VERIFY_PER_DRAW
  53. # define gcdDUMP_VERIFY_PER_DRAW 0
  54. #endif
  55. /* Standalone dump features below. */
  56. /*
  57. gcdDUMP_FRAMERATE
  58. When set to a value other than zero, averaqe frame rate will be dumped.
  59. The value set is the starting frame that the average will be calculated.
  60. This is needed because sometimes first few frames are too slow to be included
  61. in the average. Frame count starts from 1.
  62. */
  63. #ifndef gcdDUMP_FRAMERATE
  64. # define gcdDUMP_FRAMERATE 0
  65. #endif
  66. /*
  67. gcdDUMP_FRAME_TGA
  68. When set to a value other than 0, a dump of the frame specified by the value,
  69. will be done into frame.tga. Frame count starts from 1.
  70. */
  71. #ifndef gcdDUMP_FRAME_TGA
  72. # define gcdDUMP_FRAME_TGA 0
  73. #endif
  74. /*
  75. gcdDUMP_AHB_ACCESS
  76. When set to 1, a dump of all AHB register access will be printed to kernel
  77. message.
  78. */
  79. #ifndef gcdDUMP_AHB_ACCESS
  80. # define gcdDUMP_AHB_ACCESS 0
  81. #endif
  82. #endif /* __gc_hal_dump_h_ */