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

Refactored data clumps with the help of LLMs (research project) #9352

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 8 additions & 16 deletions core/src/main/java/hudson/util/ProcessTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,11 @@ abstract static class ProcfsUnix extends Unix {
* A process.
*/
public abstract class UnixProcess extends OSProcess {

protected int ppid;
protected EnvVars envVars;
protected List<String> arguments;

protected UnixProcess(int pid) {
super(pid);
}
Expand Down Expand Up @@ -877,9 +882,6 @@ protected LinuxProcess createProcess(int pid) throws IOException {
}

class LinuxProcess extends UnixProcess {
private int ppid = -1;
private EnvVars envVars;
private List<String> arguments;

LinuxProcess(int pid) throws IOException {
super(pid);
Expand Down Expand Up @@ -1001,13 +1003,11 @@ private class AIXProcess extends UnixProcess {
*/
private final boolean b64;

private final int ppid;

private final long pr_envp;
private final long pr_argp;
private final int argc;
private EnvVars envVars;
private List<String> arguments;


private AIXProcess(int pid) throws IOException {
super(pid);
Expand Down Expand Up @@ -1327,7 +1327,6 @@ private class SolarisProcess extends UnixProcess {
*/
private final boolean b64;

private final int ppid;
/**
* Address of the environment vector.
*/
Expand All @@ -1337,8 +1336,7 @@ private class SolarisProcess extends UnixProcess {
*/
private final long argp;
private final int argc;
private EnvVars envVars;
private List<String> arguments;


private SolarisProcess(int pid) throws IOException {
super(pid);
Expand Down Expand Up @@ -1596,9 +1594,6 @@ private static class Darwin extends Unix {
}

private class DarwinProcess extends UnixProcess {
private final int ppid;
private EnvVars envVars;
private List<String> arguments;

DarwinProcess(int pid, int ppid) {
super(pid);
Expand Down Expand Up @@ -1881,9 +1876,6 @@ private static class FreeBSD extends Unix {

private class FreeBSDProcess extends UnixProcess {

private final int ppid;
private EnvVars envVars;
private List<String> arguments;

FreeBSDProcess(int pid, int ppid) {
super(pid);
Expand Down Expand Up @@ -1934,7 +1926,7 @@ public synchronized EnvVars getEnvironmentVariables() {

@Override
@NonNull
public List<String> getArguments() {
public synchronized List<String> getArguments() {
if (arguments != null) {
return arguments;
}
Expand Down
Loading