-
Notifications
You must be signed in to change notification settings - Fork 164
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
add trace tool to support libva trace process #251
base: master
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,1970 @@ | |||
{ | |||
"name": "Intel-Media", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
media driver manifest, auto generated from manifest file
tracetool/Manifest/libva_trace.man
Outdated
<?xml version="1.0"?> | ||
<instrumentationManifest xsi:schemaLocation="http://schemas.microsoft.com/win/2004/08/events eventman.xsd" xmlns="http://schemas.microsoft.com/win/2004/08/events" xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:trace="http://schemas.microsoft.com/win/2004/08/events/trace"> | ||
<instrumentation> | ||
<events> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libva manifest, describe event and event data format.
tracetool/Modules/ftrace.py
Outdated
TYPE_PADDING = 29 | ||
TYPE_TIME_EXTEND = 30 | ||
TYPE_TIME_STAMP = 31 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
script to parser trace.dat file from trace-cmd
@@ -0,0 +1,51 @@ | |||
import unittest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unittest code
tracetool/Modules/libva.py
Outdated
|
||
class mpeg2(base): | ||
def __init__(self): | ||
self.dispatch = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only add mpeg2 decode and h264 encode buffer data support at first version.
try run and capture trace with libva-util mpeg2 decode and h264 encode sample app.
8a9f52d
to
9a73413
Compare
tracetool/version.py
Outdated
# <micro version> increase the version for other change (new definition etc.) | ||
# reset micro version to zero when minor version is incremented | ||
|
||
version = '2.5.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where this is coming from? latest version of libva-utils is 2.14.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trace tool has its own version, its source and version is synced from gfx-driver trace tool.
after this pr done, i need back merge change to gfx-driver.
in the future, trace tool should sync to gfx-driver trace tool regularly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libva-utils already has versioning. Don't introduce another one especially which relies on some internal development state. Please, align with whatever version is current for libva-utils.
b6e2d4a
to
5d4e977
Compare
f58b610
to
994dd12
Compare
30a44bd
to
3bbb0cc
Compare
tracetool/version.py
Outdated
# <micro version> increase the version for other change (new definition etc.) | ||
# reset micro version to zero when minor version is incremented | ||
|
||
version = '2.5.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libva-utils already has versioning. Don't introduce another one especially which relies on some internal development state. Please, align with whatever version is current for libva-utils.
made a change to version, reuse libva-utils version if exist |
tracetool/version.py
Outdated
|
||
version = '2.5.1' | ||
# get version from external if have | ||
if os.path.isfile('..'+os.sep+'meson.build'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imho, I think this is bad idea. We just need to hardcode the same version here as for meson.build and confgure.ac and provide a ci job to verify that version is the same across all 3 places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to detect version in code, if hardcode here, next version update need change here too. someone may forget to do that.
configure use pkg cmd to get installed libva version. is this way better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. configure.ac hardcodes this as well: https://github.com/intel/libva-utils/blob/master/configure.ac#L31. That's why I talk about ci job to check version match.
I do not think that runtime detection is a good thing. It needs to be embedded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, have matched to latest libva-utils version
Signed-off-by: Lindong Wu <[email protected]>
adf6a2a
to
a2644e5
Compare
# Licensed under the MIT License. | ||
# | ||
|
||
# tool version match to libva-utils version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
match to libva-utils version, also update version comments
Signed-off-by: Lindong Wu [email protected]