[igt-dev] [PATCH i-g-t 05/11] trace.pl: Use context hw_id as context id
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Tue Feb 6 18:37:52 UTC 2018
On 30/01/2018 12:29, Lionel Landwerlin wrote:
> Chris is looking at updating the hw_id per submission or something...
> Just letting you know, that might impact your new way of tracking things :(
Hm yeah, maybe even rings a bell that hw_id can be re-used as contexts
are destroyed an created so would confuse the script without any
changes. Will double-check. Luckily this patch is completely independent
from the rest so can simply be dropped in that case.
Regards,
Tvrtko
> On 30/01/18 10:11, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>>
>> Now that it is available from the kernel, use the generally much smaller
>> and so more readable, hw_id as the request context id.
>>
>> This also means context id squashing command line switch has to be
>> removed.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>> Cc: John Harrison <John.C.Harrison at intel.com>
>> ---
>> scripts/trace.pl | 22 ++--------------------
>> 1 file changed, 2 insertions(+), 20 deletions(-)
>>
>> diff --git a/scripts/trace.pl b/scripts/trace.pl
>> index be256ad8b94e..958c83c82b8b 100755
>> --- a/scripts/trace.pl
>> +++ b/scripts/trace.pl
>> @@ -38,7 +38,6 @@ my %skip_box;
>> my $html = 0;
>> my $trace = 0;
>> my $avg_delay_stats = 0;
>> -my $squash_context_id = 0;
>> my $gpu_timeline = 0;
>> my @args;
>> @@ -107,8 +106,6 @@ Usage:
>> --html Generate HTML output.
>> --trace cmd Trace the following command.
>> --avg-delay-stats Print average delay stats.
>> - --squash-ctx-id Squash context id by substracting
>> engine
>> - id from ctx id.
>> --gpu-timeline Draw overall GPU busy timeline.
>> ENDHELP
>> @@ -142,18 +139,6 @@ sub arg_avg_delay_stats
>> return @_;
>> }
>> -sub arg_squash_ctx_id
>> -{
>> - return unless scalar(@_);
>> -
>> - if ($_[0] eq '--squash-ctx-id') {
>> - shift @_;
>> - $squash_context_id = 1;
>> - }
>> -
>> - return @_;
>> -}
>> -
>> sub arg_gpu_timeline
>> {
>> return unless scalar(@_);
>> @@ -286,7 +271,6 @@ while (@args) {
>> @args = arg_help(@args);
>> @args = arg_html(@args);
>> @args = arg_avg_delay_stats(@args);
>> - @args = arg_squash_ctx_id(@args);
>> @args = arg_gpu_timeline(@args);
>> @args = arg_trace(@args);
>> @args = arg_max_items(@args);
>> @@ -320,8 +304,6 @@ sub sanitize_ctx
>> {
>> my ($ctx, $ring) = @_;
>> - $ctx = $ctx - $ring if $squash_context_id;
>> -
>> if (exists $ctxdb{$ctx}) {
>> return $ctx . '.' . $ctxdb{$ctx};
>> } else {
>> @@ -386,8 +368,8 @@ while (<>) {
>> $ring = $tp{'ring'};
>> $seqno = $tp{'seqno'};
>> - if (exists $tp{'ctx'}) {
>> - $ctx = $tp{'ctx'};
>> + if (exists $tp{'hw_id'}) {
>> + $ctx = $tp{'hw_id'};
>> $orig_ctx = $ctx;
>> $ctx = sanitize_ctx($ctx, $ring);
>> $key = db_key($ring, $ctx, $seqno);
>
>
> _______________________________________________
> igt-dev mailing list
> igt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
More information about the igt-dev
mailing list