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
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.
"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 ***