add side_effects logging artifact (#171469)
Summary:
Implements https://github.com/pytorch/pytorch/issues/169722
Added `TORCH_LOGS="side_effects"` to track which side effects Dynamo codegen'd.
This information to tlparse as well. Sample output in tlparse:
```
Mutating object of type list (source name: G['lst'])
File "/data/users/williamwen/pytorch4/playground.py", line 15, in <module>
fn(torch.ones(3))
File "/data/users/williamwen/pytorch4/playground.py", line 8, in fn
lst.append(4)
********
File "/data/users/williamwen/pytorch4/playground.py", line 15, in <module>
fn(torch.ones(3))
File "/data/users/williamwen/pytorch4/playground.py", line 9, in fn
lst.append(5)
========================================
Mutating object of type dict (source name: G['dct'])
File "/data/users/williamwen/pytorch4/playground.py", line 15, in <module>
fn(torch.ones(3))
File "/data/users/williamwen/pytorch4/playground.py", line 10, in fn
dct[3] = 4
********
File "/data/users/williamwen/pytorch4/playground.py", line 15, in <module>
fn(torch.ones(3))
File "/data/users/williamwen/pytorch4/playground.py", line 11, in fn
dct[4] = 5
********
File "/data/users/williamwen/pytorch4/playground.py", line 15, in <module>
fn(torch.ones(3))
File "/data/users/williamwen/pytorch4/playground.py", line 12, in fn
dct[5] = 6
```
X-link: https://github.com/pytorch/pytorch/pull/171469
Approved by: https://github.com/Lucaskabela, https://github.com/zou3519, https://github.com/zhxchen17
Reviewed By: atalman
Differential Revision: D90284905
fbshipit-source-id: 14fd74596c44da6b447b1817c21a439f451924b7