Hi folks,
hope You can help me with use of the development tools:
As you can see, the negative values are just 32bit. But this probe delivers an
And when they are displayed as "%d", they do not even appear as negative:
This is quite bad, and very misleading. So, what is going on here, or what am I doing wrong??
PMc
hope You can help me with use of the development tools:
Code:
# dtrace -Sn 'arc-available_memory { printf("%x %x", arg0, arg1); }'
DIFO 0x286450a0 returns D type (integer) (size 8)
OFF OPCODE INSTRUCTION
00: 29010601 ldgs DT_VAR(262), %r1 ! DT_VAR(262) = "arg0"
01: 23000001 ret %r1
NAME ID KND SCP FLAG TYPE
arg0 262 scl glb r D type (integer) (size 8)
DIFO 0x286450f0 returns D type (integer) (size 8)
OFF OPCODE INSTRUCTION
00: 29010701 ldgs DT_VAR(263), %r1 ! DT_VAR(263) = "arg1"
01: 23000001 ret %r1
NAME ID KND SCP FLAG TYPE
arg1 263 scl glb r D type (integer) (size 8)
dtrace: description 'arc-available_memory ' matched 1 probe
0 14 none:arc-available_memory 2fb000 2
0 14 none:arc-available_memory 4e000 2
1 14 none:arc-available_memory ffffb000 2
1 14 none:arc-available_memory ffffb000 2
1 14 none:arc-available_memory ffffb000 2
1 14 none:arc-available_memory 19000 2
0 14 none:arc-available_memory d38000 2
As you can see, the negative values are just 32bit. But this probe delivers an
int64_t
, correctly mentioned in the intermediate code: size 8
, and the same probe is properly shown on an amd64 machine.And when they are displayed as "%d", they do not even appear as negative:
Code:
1 14 none:arc-available_memory 81920 5
1 14 none:arc-available_memory 69632 5
1 14 none:arc-available_memory 4294955008 5
1 14 none:arc-available_memory 4294955008 5
This is quite bad, and very misleading. So, what is going on here, or what am I doing wrong??
PMc