-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename the perfetto gpu data producer name from libpps-producer to libgpudataproducer to align with AGI/cts. To pass the test, it also need following cmd: 1, setenforce 0 2, sysctl dev.i915.perf_stream_paranoid=0 sysctl dev.i915_ag.perf_stream_paranoid=0 When in vm mode, at least 1 gpu needs to be passthoughed. SRIOV mode has no metrics info provided under dir: /sys/dev/char/%d:%d/device/drm Tracked-On: OAM-128278 Signed-off-by: ZhuChenyanX <[email protected]>
- Loading branch information
1 parent
e68f165
commit d65ffc6
Showing
10 changed files
with
113 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,30 @@ | ||
extern int pps_main(int argc, const char **argv); | ||
#include <cstdio> | ||
#include <dlfcn.h> | ||
|
||
typedef void (*pps_main_fn_t)(int, const char **); | ||
|
||
#define PPS_LIB "/vendor/lib64/libgpudataproducer.so" | ||
|
||
int main(int argc, const char **argv) { | ||
return pps_main(argc, argv); | ||
char *error; | ||
|
||
void *handle = dlopen(PPS_LIB, RTLD_GLOBAL); | ||
if ((error = dlerror()) != nullptr || handle == nullptr) { | ||
fprintf(stdout, "Error loading lib: %s\n", error); | ||
return -1; | ||
} | ||
|
||
pps_main_fn_t ppsFn = (pps_main_fn_t)dlsym(handle, "pps_main"); | ||
if (((error = dlerror()) != nullptr) || (ppsFn == nullptr)) { | ||
fprintf(stdout, "Error looking for pps_main symbol: %s\n", error); | ||
dlclose(handle); | ||
return -1; | ||
} | ||
|
||
fprintf(stdout, "start call pps_main\n"); | ||
(*ppsFn)(argc, argv); | ||
fprintf(stdout, "end call pps_main\n"); | ||
|
||
dlclose(handle); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters