Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Commit

Permalink
Add new provider to monitor GPU memory allocations
Browse files Browse the repository at this point in the history
Summary: Adding a new provider to monitor memory allocations to Adreno GPUs.

Reviewed By: dalves

Differential Revision: D23797996

fbshipit-source-id: 89f1b30680398ce44a028e5a879478169ea03191
  • Loading branch information
Wesley Elias Ribeiro authored and facebook-github-bot committed Sep 22, 2020
1 parent e45cb21 commit 50a985b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions cpp/codegen/config/android.py
Expand Up @@ -180,6 +180,9 @@
'ION_MEMORY_ALLOC',
'ION_MEMORY_FREE',
'ION_MEMORY_MAPPED',

'GPU_MEMORY_ALLOC',
'GPU_MEMORY_FREE',
]

STACK_FRAME_ENTRIES = frozenset([
Expand Down
4 changes: 3 additions & 1 deletion cpp/generated/EntryType.cpp
@@ -1,4 +1,4 @@
// @generated SignedSource<<1fe1e9d2994a139a7a582085cc4bd607>>
// @generated SignedSource<<194f5e1432299ac88cbb653af4724ef0>>

#include <stdexcept>
#include <profilo/entries/EntryType.h>
Expand Down Expand Up @@ -119,6 +119,8 @@ const char* to_string(EntryType type) {
case EntryType::ION_MEMORY_ALLOC: return "ION_MEMORY_ALLOC";
case EntryType::ION_MEMORY_FREE: return "ION_MEMORY_FREE";
case EntryType::ION_MEMORY_MAPPED: return "ION_MEMORY_MAPPED";
case EntryType::GPU_MEMORY_ALLOC: return "GPU_MEMORY_ALLOC";
case EntryType::GPU_MEMORY_FREE: return "GPU_MEMORY_FREE";
default: throw std::invalid_argument("Unknown entry type");
}
}
Expand Down
4 changes: 3 additions & 1 deletion cpp/generated/EntryType.h
@@ -1,4 +1,4 @@
// @generated SignedSource<<f0096aebaafb71661a2a63cefe6e3892>>
// @generated SignedSource<<305cec077d42ebfe3a335e5246c03e75>>

#pragma once

Expand Down Expand Up @@ -116,6 +116,8 @@ enum class EntryType {
ION_MEMORY_ALLOC = 107,
ION_MEMORY_FREE = 108,
ION_MEMORY_MAPPED = 109,
GPU_MEMORY_ALLOC = 110,
GPU_MEMORY_FREE = 111,
};


Expand Down
6 changes: 5 additions & 1 deletion cpp/generated/EntryType.java
@@ -1,4 +1,4 @@
// @generated SignedSource<<417fe670410ef554b22bcf06950c5870>>
// @generated SignedSource<<0fb00a9b0fde6b0f4dc480a961bfae82>>

package com.facebook.profilo.entries;

Expand Down Expand Up @@ -114,6 +114,8 @@ public class EntryType {
public static final int ION_MEMORY_ALLOC = 107;
public static final int ION_MEMORY_FREE = 108;
public static final int ION_MEMORY_MAPPED = 109;
public static final int GPU_MEMORY_ALLOC = 110;
public static final int GPU_MEMORY_FREE = 111;

public static final String[] NAMES = {
"UNKNOWN_TYPE",
Expand Down Expand Up @@ -226,5 +228,7 @@ public class EntryType {
"ION_MEMORY_ALLOC",
"ION_MEMORY_FREE",
"ION_MEMORY_MAPPED",
"GPU_MEMORY_ALLOC",
"GPU_MEMORY_FREE",
};
}

0 comments on commit 50a985b

Please sign in to comment.