Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-E regex matching sub-class error or something else? #211

Closed
1 task done
Hearen opened this issue Oct 11, 2018 · 1 comment
Closed
1 task done

-E regex matching sub-class error or something else? #211

Hearen opened this issue Oct 11, 2018 · 1 comment

Comments

@Hearen
Copy link
Contributor

Hearen commented Oct 11, 2018

  • I have searched the issues of this repository and believe that this is not a duplicate.

No answer and details provided in #96

More details provided here to re-produce the issue.

Environment
Arthas version: 3.0.4
Operating System version: 15.6.0 Darwin Kernel Version 15.6.0
Java version of target JVM: jdk1.8.0_73
Java version of JVM used to attach: jdk1.8.0_73

Steps to reproduce this issue

  1. follow this to start Arthas: https://github.com/Hearen/arthas/blob/doc-with-consistent-demo/site/src/site/sphinx/en/quick-start.md
  2. select the demo to monitor
  3. using command sc to locate class demo.Demo$Counter.

Expected

$ sc demo.Demo$Counter
demo.Demo$Counter
Affect(row-cnt:1) cost in 1 ms.

$ sc -E demo\.Demo\$Counter
demo.Demo$Counter
Affect(row-cnt:1) cost in 11 ms.

Actual Result

$ sc demo.Demo$Counter
demo.Demo$Counter
Affect(row-cnt:1) cost in 1 ms.

$ sc -E demo\.Demo\$Counter
Affect(row-cnt:0) cost in 2 ms.

$ sc -E demo\.Demo\\$Counter
demo.Demo$Counter
Affect(row-cnt:1) cost in 3 ms.

$ sc -E demo.Demo\\$Counter
demo.Demo$Counter
Affect(row-cnt:1) cost in 3 ms.

Questions

  1. Why require \\ instead of a single \ here? Unlike this escaping rule Arthas的一些特殊用法文档说明 #71 (comment) and sc -E demo\.Demo\$Counter didn't work?
  2. Why sc -E demo.Demo\\$Counter worked? Shouldn't it be sc -E demo\.Demo\$Counter?
@hengyunabc
Copy link
Collaborator

Refer to #302

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants