[PATCH 1/3] tests: add xetpriority.test
Fei, Jie/费 杰
feij.fnst at cn.fujitsu.com
Wed Mar 9 06:06:13 UTC 2016
Hi,
On 03/09/2016 11:32 AM, Dmitry V. Levin wrote:
> On Wed, Mar 09, 2016 at 11:27:37AM +0800, Fei, Jie/费 杰 wrote:
>> On 03/08/2016 06:36 AM, Dmitry V. Levin wrote:
>>> On Mon, Mar 07, 2016 at 11:29:49AM +0800, Fei, Jie/费 杰 wrote:
>>>> On 03/04/2016 10:46 PM, Dmitry V. Levin wrote:
>>>>> On Fri, Mar 04, 2016 at 05:10:46PM +0800, Fei Jie wrote:
>>>>> [...]
>>>>>> * linux/dummy.h: (sys_getpriority, sys_setpriority): Change to
>>>>>> printargs_d.
>>>>> Why?
>>>>>
>>>> I added this to make strace print xetpriority in the following format:
>>>> getpriority(0, 17207) = 20
>>>> instead of
>>>> getpriority(PRIO_PROCESS, 18446744069414605786) = 20.
>>> Why do you think that
>>> getpriority(0, 17207) = 20
>>> is better than
>>> getpriority(PRIO_PROCESS, 17207) = 20
>>> ?
>>>
>>> I'd agree if you suggested to print 2nd argument of getpriority and
>>> setpriority using %d format, but what's wrong with current symbolic
>>> representation of their 1st argument?
>>>
>> My original idea was to print the 2nd argument in %d format by adding
>> printargs_d, but it changed the 1st argument's format.
>> Would it be helpful by modifying SYS_FUNC(xetpriority) in resource.c as
>> follows?
>>
>> SYS_FUNC(getpriority)
>> {
>> printxval(priorities, tcp->u_arg[0], "PRIO_???");
>> tprintf(", %d", (int) tcp->u_arg[1]);
>>
>> return RVAL_DECODED;
>> }
>>
>> SYS_FUNC(setpriority)
>> {
>> printxval(priorities, tcp->u_arg[0], "PRIO_???");
>> tprintf(", %d, %d", (int) tcp->u_arg[1], (int) tcp->u_arg[2]);
>>
>> return RVAL_DECODED;
>> }
> Yes, I think that's OK. Please reflect this change in the commit message.
Thanks. I've modified the patches to V3.
>
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
>
>
> _______________________________________________
> Strace-devel mailing list
> Strace-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/strace-devel
--
Thanks!
Fei Jie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160309/6d84ff95/attachment.html>
More information about the Strace-devel
mailing list