Bug 2157 - Cannot clear pmaps
Summary: Cannot clear pmaps
Status: RESOLVED DUPLICATE of bug 2140
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-16 08:39 UTC by Martin Hunt
Modified: 2006-01-16 18:59 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Hunt 2006-01-16 08:39:18 UTC
Maps containing stats (pmaps) cannot be cleared by either doing
foo[1] = 0
or
delete foo

Testcase is checked in as tests/testsuite/systemtap.maps/ix_clear.stp
Comment 1 Josh Stone 2006-01-16 18:40:41 UTC
This is covered by bug 2140.  I've submitted an initial patch for that bug, but
it's not quite complete yet.

This bug should probably be marked as a duplicate, unless we want 'stat=0' to
also clear stats.  That will require more changes to the way types are inferred
- e.g. do we special-case 0, or do we also allow 'stat=1'?  And what would that
mean?  I think the delete operator makes more sense.
Comment 2 Frank Ch. Eigler 2006-01-16 18:59:05 UTC
"delete ARRAY" and "delete ARRAY[index]" should clearly work for both plain and
aggregate arrays.  I can go along with a "delete SCALAR" too.

Using assignment to reset is less appealing.


*** This bug has been marked as a duplicate of 2140 ***