Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - a prototype of instrumenting GFXR with Perfetto traces. #1807

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

m--koma
Copy link

@m--koma m--koma commented Oct 10, 2024

Uploaded for sharing purposes only. Please do not merge.

Would appreciate guidance if there's another recommended way to share WIP work - thanks!

@ci-tester-lunarg
Copy link

Author m--koma not on autobuild list. Waiting for curator authorization before starting CI build.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@m--koma m--koma changed the title DO NOT MERGE - a prototype of instrumenting GFXR with Perfetto traces. WIP / DO NOT MERGE - a prototype of instrumenting GFXR with Perfetto traces. Oct 10, 2024
@m--koma m--koma changed the title WIP / DO NOT MERGE - a prototype of instrumenting GFXR with Perfetto traces. WIP - a prototype of instrumenting GFXR with Perfetto traces. Oct 10, 2024
@m--koma m--koma marked this pull request as draft October 10, 2024 13:16
@@ -1,5 +1,7 @@
add_library(gfxrecon_encode STATIC "")

add_library(perfetto STATIC ${CMAKE_CURRENT_LIST_DIR}/../../../../perfetto/sdk/perfetto.cc)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this path translate into. I needed to change this to:

/home/ianelliott/android/main1/vendor/arm/mali/valhall/cinstr/production/third_party/perfetto/vendor/sdk

where /home/ianelliott/android/main1 is one of my Android build trees.


#if defined(__unix__)
extern char** environ;
#endif

// PERFETTO_DEFINE_CATEGORIES(perfetto::Category("GFXR").SetDescription("Events from the graphics subsystem"));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this commented out, as are other TRACE_EVENT_* macros in this file?

@@ -352,7 +381,7 @@ bool CommonCaptureManager::Initialize(format::ApiFamilyId api_
// External memory takes precedence over shadow memory modes.
if (use_external_memory)
{
page_guard_memory_mode_ = kMemoryModeExternal;
page_guard_memory_mode_ = kMemoryModeExternal;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably eliminate this white space:-)

@@ -52,6 +54,7 @@ target_sources(gfxrecon_encode
target_include_directories(gfxrecon_encode
PUBLIC
${CMAKE_BINARY_DIR}
${GFXRECON_SOURCE_DIR}/framework)
${GFXRECON_SOURCE_DIR}/framework
${CMAKE_CURRENT_LIST_DIR}/../../../../perfetto/sdk)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this relative path translate into? I changed this to:

/home/ianelliott/android/main1/vendor/arm/mali/valhall/cinstr/production/third_party/perfetto/vendor/sdk

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at my Sokatoa source tree, I see that it includes perfetto and GFXR in (I use "$(TOP)" to indicate the top of the Sokatoa source tree):

  • $(TOP)/external/perfetto/sdk
  • $(TOP)/external/gfxreconstruct

Therefore, the above path (from $(TOP)/external/gfxreconstruct/android/framework/encode/CMakeLists.txt)
would translate to $(TOP)/external/perfetto/sdk. True?

@@ -106,6 +113,23 @@ CommonCaptureManager::CommonCaptureManager() :
allow_pipeline_compile_required_(false), quit_after_frame_ranges_(false), block_index_(0)
{}

ParameterEncoder* CommonCaptureManager::BeginTrackedApiCallCapture(format::ApiCallId call_id)
Copy link

@ianelliottus ianelliottus Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this method doing? It looks like a copy of the generic one (from the header file) that could do more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants