Hello,

I am interested if I understood correctly as to how DTrace handles
variables. Given a D script, the compiler transforms it in a DOF, which
comprises of the header, array of section headers, loadable sections' data
and unloadable sections' data. The data contains DIFOs. Each DIFO stores a
compiled DIF -- including it's variable tables. Since a variable table is
of type struct dtrace_difv, this is where all the variables would be stored
-- the global scoped, thread-local and clause-local variables.

So using a clause-local variable here such as this->foo would generate a
DIF represented variable with it's name index in the dtdo_strtab, it's
identifier, kind(scalar in this case), scope -- which in this case would be
DIFV_SCOPE_LOCAL and it's flags.

Am I correct to assume that the highest possible variable identifier each
script can have is 2^16 - 1 -- or 0xFFFF? If one were to change the highest
possible identifier, are there any subtleties that would arise as problems?

Best regards,
Domagoj Stolfa.



-------------------------------------------
dtrace-discuss
Archives: https://www.listbox.com/member/archive/184261/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184261/25769126-e243886f
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769126&id_secret=25769126-8d47a7b2
Powered by Listbox: http://www.listbox.com

Reply via email to